Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jochantrelle's avatar

5.1 Upgrade Fails, vagrant 1.7.2

Greetings Everyone,

Please help me. I am about to deploy (hopefully) several new apps and web sites.

Most of my development was completed early 2015 (Feb) using MAMP. I convinced everyone to hold off as I had started transitioning to the Laravel Framework (5.0 at the time) and wanted to go thru the courses first.

It has been going great, until...!

I upgraded to 5.1.

I believe I followed the upgrade instructions to the letter. The sites I had been fiddling with using 5.0 all still work. The PROBLEM I am having has to do with any NEW site I try to create. Via composer create-project or laravel new foo. The scripts run as expected, no errors, until I try to 'npm install'.

Everything goes wrong at this point!!! <-- npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN optional dep failed, continuing fsevents@0.3.8 npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine get-stdin@5.0.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN deprecated pangyp@2.3.2: use node-gyp@3+, it does all the things npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine hoek@2.15.0: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"})

node-sass@3.3.2 install /home/vagrant/Code/rallyrallyree/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass node scripts/install.js

Binary downloaded and installed at /home/vagrant/Code/rallyrallyree/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-11/binding.node

node-sass@3.3.2 postinstall /home/vagrant/Code/rallyrallyree/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass node scripts/build.js

/home/vagrant/Code/rallyrallyree/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-11/binding.node exists. testing binary. Binary is fine; exiting. npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm WARN engine hoek@2.15.0: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"}) npm ERR! EEXIST, open '/home/vagrant/.npm/621c48e6-pm-source-map-0-1-43-package-tgz.lock' File exists: /home/vagrant/.npm/621c48e6-pm-source-map-0-1-43-package-tgz.lock Move it away, and try again.

npm ERR! System Linux 3.13.0-24-generic npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /home/vagrant/Code/rallyrallyree npm ERR! node -v v0.10.37 npm ERR! npm -v 1.4.28 npm ERR! path /home/vagrant/.npm/621c48e6-pm-source-map-0-1-43-package-tgz.lock npm ERR! code EEXIST npm ERR! errno 47 npm ERR! not ok code 0

-->

I do as suggested mv the /home/vagrant/.npm/621c48e6-pm-source-map-0-1-43-package-tgz.lock file. Makes no differenc, same #@*! when i run npm install again.

My assumptions, guesstimates, et cetera have me trying to address one of the following, either:

I need to upgrade the version of node.js running on Vagrant(1.7.4), VirtualBox 5.04 laravel/homestead box (v0.2.7), (homestead 2.1.7), implied by the error message output, Or

Upgrade node from v0.10 to v0.12 (npm install error messages indicate this),

DID THIS: echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc . ~/.bashrc mkdir ~/local mkdir ~/node-latest-install cd ~/node-latest-install curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 ./configure --prefix=~/local make install # ok, fine, this step probably takes more than 30 seconds... curl https://www.npmjs.org/install.sh | sh

DIDN'T HELP.

SO, Maybe...

I need to repair my permissions because as per some laracast discussions encouraged using sudo npm ... while others strongly warn against using sudo, Or

I messed up something locally by running npm update which now has npm v2.14.2 on my local drive which may be messing with my virtual box, guessing here... Or

ENDED UP completely removing npm and node and node_module files and folders from my local system, just because.. DIDN"T HELP EITHER

BTW I have vagrant destroyed and rebuilt my entire dev env three times now in as many days... Or

I am just screwed....

End of the day, I can not run gulp:

module.js:340 throw err; ^ Error: Cannot find module 'laravel-elixir' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/vagrant/Code/rallyrallyree/gulpfile.js:1:76) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)

HELP! I so love Laravel and am so impressed with your work at Laracast, I really want to continue developing with the framework. I can not however risk these 5 day losses of time because of a simple upgrade. That said I am pretty sure it is something I have done wrong. I have searched far and wide to find a solution to no avail. I am desperate now.

UPDATE:: I have rolled back to VirtualBox 4.3.26 as I read that sym-links arent supported by the latest versions. I was already using 4.3.26 with Laravel 5.0 with no problems, also rolled back vagrant from 1.7.4 to 1.7.2 same scenario. STILL NO Progress, and with no help coming from anyone here so far, looks like I will have to give up on Laravel shortly.

0 likes
5 replies
jochantrelle's avatar

FINALLY, I have no idea why I went thru this, however I finally can use 5.1, WITH gulp and elixir (so far it seems, fingers crossed).

I had to download nvm as directed here https://github.com/creationix/nvm from within my vm.

Not sure if it made a difference, but I also rolled back from: VirtualBox 5.0.4 to VirtualBox 4.3.22. vagrant 1.7.4 to 1.7.2

Then a ton of npm this and npm that, until I finally deleted the node_modules folder (which I was doing and then running npm install as per discussion suggestions) from within my new laravel project and ran npm install again (after the nvm node install/update).

Only other thing I had to do was 'sudo apt-get install libnotify-bin' in order get rid of a gulp-notify error. Again this shouldnt be happening as well thought out as Laravel is.

BTW, I was really hoping someone would have chirped in a bit sooner. Anyways, I hope this helps someone.

@JeffreyWay @TaylorOtwell looks like not everyone has had this problem, seems the masses have moved up to 5.1 without the problems I have had to deal with. It seems to me my problem was not with Laravel, but vagrant and or virtual box having issues with Laravel 5.1 needing a version of node greater than 0.12 and not the 0.10 that comes with the aforementioned pair (you know what I mean better than I). Therefore my solution even-though educational on a nvm node point of view (which I have never interacted with before so intensely) is kind of a hack. I worry about ever having to vagrant/homestead destroy EVER AGAIN as I may have to go thru this drama yet again. Could someone please tell me, "O this happened to you because blah blah foo bar... here's the correct solution... foo foo bar baz". I need to move forward with Laravel with confidence, least I feel like I am selling my clients a pig in a bag awaiting catastrophe.

arector's avatar

I just kind of skimmed your post, because I had this same problem a couple of days ago, and realized I needed to upgrade Node.js. It looks like you tried to upgrade using npmjs.com upgrade instructions, which ironically didn't work for me either. The only thing I was able to get working for a proper upgrade was from https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories#the-nodesource-linux-repositories and following the instructions. I suggest you vagrant destroy, then vagrant up and immediately follow the instructions on the link I posted. Good luck!

P.S. No need to rollback versions of Virtualbox or Vagrant. That was never the problem...

2 likes
jochantrelle's avatar

@arector very appreciative of your response! I will do as you have suggested, right after these few tweaks on my current clients site and the presentation. As of right now, whenever I start my vm (homestead ssh), I have to immediately issue a nvm install 0.12 command for it to take hold and not use node 0.10 otherwise, gulp errors.

Any idea what the source of this issue is though? Everyone else seems to have moved up to 5.1 no problem. My grasping at straws assumption is the age of my laptop and possible incompatibilities, Mac OS X 10.9.5 2.66 GHz Intel Core 2 Duo (circa 2008 17" MacBool Pro, old faithful), otherwise I'm at a loss.

arector's avatar

@jochantrelle The source of the issue is that Ubuntu's apt repositories only come with Node 0.10. Until Taylor upgrades the Homestead vagrant box to use Node 0.12, every time you do a vagrant destroy, you will have to upgrade Node. Use vagrant suspend or vagrant halt to keep your vm environment instead of vagrant destroy, if that is what you are doing, and you won't have to keep upgrading Node after following the guide I linked previously. You shouldn't have to do an nvm install after that. The reason for this headache with Node versions is, I believe, because some of Laravel Elixir's or Gulp's dependencies require the newer version of Node.

jochantrelle's avatar

@arector Thank you so much! Now I know, and knowing is half the battle... LOL. Confidence in L5.1 reinstated.

I wish @JeffreyWay and or @TaylorOtwell would have said something about this, or maybe they have, and I just was not lucky enough to find it during my 5 day ordeal.

Nuff respect @arector !!!

Please or to participate in this conversation.