-
Notifications
You must be signed in to change notification settings - Fork 86
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
fix: for dfx new failure if node is installed but npm is not #3723
Conversation
Would fail with "Failed to scaffold frontend code" Also, now checks the status code when calling node and npm to see if they are installed. This means if there is a script that outputs something like the below, dfx will no longer assume the program is installed. $ npm Command 'npm' not found, but can be installed with: apt install npm Please ask your administrator.
assert_command dfx new e2e_project1 --type motoko --frontend sveltekit | ||
assert_contains "Node could not be found. Skipping installing the frontend example code." | ||
assert_contains "npm could not be found. Skipping installing the frontend example code." | ||
assert_contains "You can bypass this check by using the --frontend flag." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The executed command has the --frontend
flag.
IIUC, this line "You can bypass this check by using the --frontend flag." cannot be true.
The instruction might be outdated after the big dfx new
rewrite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but adjacent work in the context of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
dfx new
would fail with "Failed to scaffold frontend code" if node was installed, but npm was not installed.Also, now checks the status code when calling node and npm to see if they are installed. This means if there is a script that outputs something like the below, dfx will no longer assume the program is installed.
How Has This Been Tested?
Added an e2e test
Checklist: