-
Notifications
You must be signed in to change notification settings - Fork 30
bash: nvm command not found #16
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
Comments
Thanks for the detailed report. I've finally been able to recreate part of the issue. There are actual bugs and some misunderstanding going on here. First things first - role: ansible-role-nvm
nodejs_version: "8.16.0"
nvm_install: "curl"
nvm_version: "0.34.0"
nvm_profile: "/home/nodejs/.bashrc"
nvm_dir: "/home/nodejs"
nvm_commands:
- "nvm install 8.16.0" <= NOT NEEDED
- "nvm alias default 8.16.0" <= NOT NEEDED
- "nvm exec default npm install"
The role will create a folder when explicitly declaring the I suspect that you are adding:
to get around that error. Now here comes the tricky part. Now the role ensures the .bashrc file (or whatever file you've specified) is there when You can check the fixes a798f47 However, here is where I believe there is a bit of confusion. With the information you've provided above, I can probably presume that there is no real nodejs user on the Debian box and that you are just storing the nodejs stuff at Because the command to check the nvm version forces the login context to be interactive (the However, I believe this is not really what you want anyway; the error above is an underlying symptom of a larger issue. So there are a couple of options to fix the issue. I welcome any feedback
|
Ok, I believe I have fulfilled the essence of what you are attempting to do by fixing the actual bugs and providing greater details in the documentation to prevent a misunderstanding of what is happening under the hood in regards to users context/session/profile/shells. If you believe that what I have done does not address your particular issue, please feel free to open a new issue. |
Describe the bug
hello, I'm not sure if this is a "bug", but I don't know where else to ask.
I'm trying to install a specific version of nvm, node, npm on a machine image using packer, however it keeps failing no matter what I try.
Expected behavior
that it installs and passes
To Reproduce
Shell [e.g. Bash, Dash, ksh, tcsh, zsh]
bash
Desktop (please complete the following information):
Debugging output
Additional context
this may be an issue with packer, the problem seems to occur whatever I do, I need to install all this under a specific user created earlier on in the AMI creation process
any advice gratefully received.
Many thanks
The text was updated successfully, but these errors were encountered: