-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Npm fails #2535
Comments
Verify what npm in path for non-login shell. Also please check with dep v7. |
Did you ever found a solution? I run into the same problem in the 7.x versions. [prod] error in npm.php on line 25:
[prod] run command -v 'npm' || which 'npm' || type -p 'npm'
[prod] exit code 1 (General error) |
Easiest fix: use absolute paths. If this works, the problem is your $PATH variable. |
Same here. I even used absolute paths, but then I got this error:
So I used |
In my case the problem was
|
If you still wants to use NVM in the older versions without much configuration, you need to source it everytime you run a command, since deployer is working with a non interactive shell. I did this small workaround to avoid uninstalling nvm.
|
Thank you @matiasvelizb ! It still works in v7. Attached is our implementation.
|
🎉 Awesome ! Here's the YAML version for whom it can help 😏 config:
nvm: 'source $HOME/.nvm/nvm.sh'
use_nvm: '{{nvm}} && node --version && nvm use 18'
tasks:
npm:install:
script:
- '{{use_nvm}} && cd {{release_path}} && npm ci'
npm:prod:
script:
- '{{use_nvm}} && cd {{release_path}} && npm run prod'
|
The following task fails without giving a reasonable reason:
Error message:
Both
npm
andnode
do exist in the following paths:The text was updated successfully, but these errors were encountered: