Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

ScandiPWA CLI: deploy fails to recognize Scandi theme #55

Open
rMazeiks opened this issue Jun 4, 2021 · 2 comments
Open

ScandiPWA CLI: deploy fails to recognize Scandi theme #55

rMazeiks opened this issue Jun 4, 2021 · 2 comments

Comments

@rMazeiks
Copy link
Contributor

rMazeiks commented Jun 4, 2021

Describe the bug

When running the latest version of the scandipwa CLI, scandipwa deploy produces an incorrect error instead of successfully completing.

Environment

Reproduced on Ubuntu 20. I tried this on a new CSA app as well as a slightly older version. Another user has reproduced this on Windows.

Steps to reproduce

  1. Create a new theme with CSA.
  2. cd into the theme directory
  3. Run scandipwa deploy

Expected behavior

The Scandi theme should be deployed to the cloud with no errors.

Actual behavior

We get an error about not being in a theme directory, even though this is a CSA theme, and the package.json is configured correctly.

ERROR!

     To deploy your code you must be located in ScandiPWA theme directory.
     We looked up six folders up starting from /home/r/sw-proj/tmp/test-csa-2!
     There was no folders containing package.json, where scandipwa.type field was equal to theme.

This error message is wrong. I am certain my cwd is a Scandi app, and indeed it contains a package.json with scandipwa.type=theme.

Note that scandipwa create component TestComponent seems to work correctly, so everything is set up correctly.

@pocallaghan
Copy link

We get the same error message output whenever we attempt to run: scandipwa extension create test-extension. This errors for all versions > 0.3.0, but if we roll back to 0.3.0 it functions as expected. I have confirmed that the package.json contains the right value:

pocallaghan@pete scandi % cat package.json | jq ".scandipwa.type"
"theme"

NB: We're installing/running scandipwa locally rather than globally and running it with node_modules/.bin/scandipwa (for permissions reasons), but from some brief experiments we get the same issue when installing it globally.

@ramironinni
Copy link

Hi guys! I'm currently dealing with the same issue. How have you dealt whit it? I couldn't find documentation about it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants