-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn rw dev
fails when base path includes space
#596
Comments
I think the problem is this line: redwood/packages/cli/src/commands/dev.js Lines 16 to 18 in 22ba0bd
We need to pass an unescaped version of I think the root cause here is with I added an issue to concurrently. |
The error is coming from these lines: redwood/packages/cli/src/commands/dev.js Line 27 in 22ba0bd
redwood/packages/cli/src/commands/dev.js Line 36 in 22ba0bd
redwood/packages/cli/src/commands/dev.js Line 45 in 22ba0bd
For some reason, redwood/packages/cli/src/commands/dev.js Line 52 in 22ba0bd
UpdateI'm making some progress using |
@thedavidprice I think this was fixed? |
original forum topic "Yarn rw dev throwing AssertionError (Windows10)"
On both Windows and Mac (reproduced on my machine), when there is a space in the project path,
yarn rw dev
is throwing a Yargs assertion error that no command options are found indev.js
:See Error Details
I confirmed all paths are correct per console.log:
Diagnoses
It seems the error was introduced in #490 with the use of
fs.existsSync()
. For our use, when checking a path including a space, it returnsfalse
. This explains why Yargs is complaining there are no commands.Tests confirm the following:
API_DIR = '/Users/price/Repos/xx\ delete/xx-delete-again/api'
fs.existsSync(API_DIR)
returnsfalse
...however...
fs.existsSync('/Users/price/Repos/xx\ delete/xx-delete-again/api')
returnstrue
So the method can handle spaces. It's just not happy with the way we are passing in the variable
I'm at a bit of a loss 🤔
Other CLI uses of
fs.existsSync
This method is also used in the following commands. After determining a fix (or replacement), we should check the following and update as needed:
redwoodtools.js
build.js
auth.js
scaffold.js
index.js
create-redwood-app.js
The text was updated successfully, but these errors were encountered: