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.