Skip to content
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

nvm and nom not found #136

Closed
Jaspur opened this issue Feb 19, 2014 · 8 comments
Closed

nvm and nom not found #136

Jaspur opened this issue Feb 19, 2014 · 8 comments

Comments

@Jaspur
Copy link
Contributor

Jaspur commented Feb 19, 2014

When I try adding some nodejs_packages:

nodejs_version        = "latest"   # By default "latest" will equal the latest stable version
nodejs_packages       = [          # List any global NodeJS packages that you want to install
  "gulp",
 "gulp-util",
  "bower"
]

 # Install Nodejs
  config.vm.provision "shell", path: "https://raw.github.com/#{github_username}/#{github_repo}/#{github_branch}/scripts/nodejs.sh", privileged: false, args: nodejs_packages.unshift(nodejs_version)

I get the following:

php5_invoke: Enable module pdo_sqlite for cli SAPI
Setting up php5-imagick (3.1.2-1+debphp.org~precise+1) ...
>>> Installing Node Version Manager
>>> Installing Node.js version latest
    This will also be set as the default node version
>>> Starting to config Node.js
>>> Start installing Global Node Packages


Stderr from the command:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9438  100  9438    0     0  31214      0 --:--:-- --:--:-- --:--:-- 50202
/tmp/vagrant-shell: line 52: nvm: command not found
/tmp/vagrant-shell: line 55: nvm: command not found
/tmp/vagrant-shell: line 57: nvm: command not found
/tmp/vagrant-shell: line 62: npm: command not found
/tmp/vagrant-shell: line 87: npm: command not found

Tried it a couple of times.

@Ilyes512
Copy link
Contributor

I will look at it when I get up (going to sleep now). What you can do is see if you are able to install gulp manually after provisioning is done without installing gulp trough the varaibles. You might get a more detailed error if you get any.

@Jaspur
Copy link
Contributor Author

Jaspur commented Feb 20, 2014

I also tried installing it with only bower.

@Ilyes512
Copy link
Contributor

And that failed as well? I have run bower or yo multiple times with succes before (when I was testing the script). I will run a new Vaprobash provisioning in a few minutes.

@Jaspur
Copy link
Contributor Author

Jaspur commented Feb 20, 2014

Yep. Also failed. Tried different machines.

Selecting previously unselected package zsh.
(Reading database ... 56098 files and directories currently installed.)
Unpacking zsh (from .../zsh_4.3.17-1ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Setting up zsh (4.3.17-1ubuntu1) ...
update-alternatives: using /bin/zsh4 to provide /bin/zsh (zsh) in auto mode.
update-alternatives: using /bin/zsh4 to provide /bin/rzsh (rzsh) in auto mode.
update-alternatives: using /bin/zsh4 to provide /bin/ksh (ksh) in auto mode.
--2014-02-20 16:35:46--  https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
Resolving github.com (github.com)... 192.30.252.129
Connecting to github.com (github.com)|192.30.252.129|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh [following]
--2014-02-20 16:35:46--  https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh
Resolving raw.github.com (raw.github.com)... 185.31.16.133
Connecting to raw.github.com (raw.github.com)|185.31.16.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1859 (1.8K) [text/plain]
Saving to: `STDOUT'
>>> Installing Node.js version latest
    This will also be set as the default node version
>>> Starting to config Node.js
>>> Start installing Global Node Packages


Stderr from the command:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   136    0   136    0     0    289      0 --:--:-- --:--:-- --:--:--   400
sh: 1: Syntax error: redirection unexpected
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9355  100  9355    0     0  32231      0 --:--:-- --:--:-- --:--:-- 52556
/tmp/vagrant-shell: line 52: nvm: command not found
/tmp/vagrant-shell: line 55: nvm: command not found
/tmp/vagrant-shell: line 57: nvm: command not found
/tmp/vagrant-shell: line 62: npm: command not found
/tmp/vagrant-shell: line 87: npm: command not found

Why is it looking for oh-my-zsh stuff. I disabled that part..
https://www.dropbox.com/s/n2b4b9o9fctb6dx/Screenshot%202014-02-20%2017.53.41.png

@pedroborges
Copy link
Contributor

I'm getting the same error here (npm: command not found). Actually, lot's of weird things are happening... Like the only thing in .zshrc is:

# Add Composer Global Bin to PATH
export PATH=$PATH:~/.composer/vendor/bin

Oh-My-Zsh isn't being installed and says git is not installed, when it indeed is... I've been trying to provision a VM without success. I'm now trying without Oh-My-Zsh and Node.js.

@Ilyes512
Copy link
Contributor

I think I might have found the problem. Testing right now.

@Ilyes512
Copy link
Contributor

It had to do with gist redirect's that did't work as planned within bash. Nice of github to warn us about the redirect's (I couldn't find any announcement on there blog).

@pedroborges
Copy link
Contributor

You've nailed it @Ilyes512! Thank you taking time to help us!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants