Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

What does Boxen do with NPM and NVM? #151

Closed
kevinSuttle opened this issue Mar 8, 2013 · 8 comments
Closed

What does Boxen do with NPM and NVM? #151

kevinSuttle opened this issue Mar 8, 2013 · 8 comments
Labels

Comments

@kevinSuttle
Copy link
Member

Yeah, no clue what's going on here.

☰  which nvm
nvm not found
☰  npm install -g coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http 200 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.1.tgz
npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.1.tgz
/opt/boxen/nvm/v0.8.8/bin/coffee -> /opt/boxen/nvm/v0.8.8/lib/node_modules/coffee-script/bin/coffee
/opt/boxen/nvm/v0.8.8/bin/cake -> /opt/boxen/nvm/v0.8.8/lib/node_modules/coffee-script/bin/cake
coffee-script@1.6.1 /opt/boxen/nvm/v0.8.8/lib/node_modules/coffee-script
☰  which coffee
coffee not found
@rtgibbons
Copy link

This has been discussion in boxen/puppet-nvm , this comment is the best solutions for now boxen/puppet-nvm#3 (comment)

@wfarr
Copy link
Contributor

wfarr commented Mar 8, 2013

Please do note it's not optimal. That said; we are thus far in the camp of "avoid global dependencies when possible." To that end, we currently install only Bundler and rbenv-rehash globally to any of our ruby versions specifically. This grants both flexibility and isolation. I am curious why the node community, when it comes to things like the coffee-script library and bower advocate something that ends up being a weird pseudo-mix of the two (which may be an artifact of my own continued ignorance).

tl;dr it's currently not great for users or maintainers, and I would love to make it better, but the assumptions of one end conflict with the reality of another

Will Farrington
System Operations Engineer
GitHub, Inc.

On Mar 8, 2013, at 12:45 AM, Ryan Gibbons notifications@github.com wrote:

This has been discussion in boxen/puppet-nvm , this comment is the best solutions for now boxen/puppet-nvm#3


Reply to this email directly or view it on GitHub.

@kevinSuttle
Copy link
Member Author

This doesn't work for me. If I source in zsh, I get this cryptic error:

/opt/boxen/nvm/nvm.sh:export:10: not valid in this context: /opt/boxen/nvm^G/opt/boxen/nvm

Bash gets it. Zsh does not.

☰  source /opt/boxen/nvm/nvm.sh
/opt/boxen/nvm/nvm.sh:export:10: not valid in this context: /opt/boxen/nvm^G/opt/boxen/nvm                
☰  bash -s source /opt/boxen/nvm/nvm.sh
bash-4.2$ source /opt/boxen/nvm/nvm.sh
bash-4.2$ zsh
☰  nvm unvm use 0.8.2       
zsh: correct 'nvm' to 'nm' [nyae]? n
zsh: command not found: nvm
☰  nvm use stable
zsh: correct 'nvm' to 'nm' [nyae]? n
zsh: command not found: nvm
☰  bash -s source /opt/boxen/nvm/nvm.sh
bash-4.2$ source /opt/boxen/nvm/nvm.sh 
bash-4.2$ nvm use 
.DS_Store        .librarian/      Gemfile          Puppetfile.lock  docs/            modules/
.bundle/         .projects        Gemfile.lock     README.md        lib/             script/
.git/            .ruby-version    LICENSE          bin/             log/             shared/
.gitignore       .tmp/            Puppetfile       config/          manifests/       vendor/
bash-4.2$ nvm use 0.8.22
N/A version is not installed yet
bash-4.2$ nvm install 0.8.22
######################################################################## 100.0%
Now using node v0.8.22
bash-4.2$ zsh 
☰  nvm use 0.8.22
zsh: correct 'nvm' to 'nm' [nyae]? n
zsh: command not found: nvm
☰  

@kevinSuttle
Copy link
Member Author

Ah, yeah. This is not optimal.

Read the previous comment for frame of reference for this one. It picks up right where the previous left off.

☰  npm install roole -g
npm http GET https://registry.npmjs.org/roole
npm http 200 https://registry.npmjs.org/roole
npm http GET https://registry.npmjs.org/roole/-/roole-0.3.0.tgz
npm http 200 https://registry.npmjs.org/roole/-/roole-0.3.0.tgz
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-1.1.1.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-1.1.1.tgz
npm http GET https://registry.npmjs.org/keypress
npm http 200 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
npm http 200 https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
/opt/boxen/nvm/v0.8.8/bin/roole -> /opt/boxen/nvm/v0.8.8/lib/node_modules/roole/bin/roole
roole@0.3.0 /opt/boxen/nvm/v0.8.8/lib/node_modules/roole
├── mkdirp@0.3.5
└── commander@1.1.1 (keypress@0.1.0)
☰  

Perhaps node/npm/nvm should be left out of boxen, or managed with something like yeoman?

@ocxo
Copy link
Contributor

ocxo commented May 11, 2013

@kevinSuttle If you bump to the latest version of nodejs (see https://github.com/boxen/our-boxen/blob/master/Puppetfile), are you still having this problem?

@ocxo ocxo closed this as completed Oct 25, 2013
@atomless
Copy link

Why was this closed? It still looks like boxen causes issues with nvm so this should still be open?

@kevinSuttle
Copy link
Member Author

I honestly haven't touched this in a long time. Not even sure why I'm still in the org TBH.

@dgoodlad
Copy link
Contributor

@atomless this issue was from nearly 18 months ago, and got no response when @fromonesrc asked for confirmation that the new version fixed it.

If you've got specific issues with nvm, please open them on the boxen/puppet-nodejs repo.

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

No branches or pull requests

6 participants