Reputation: 2735
I am new to Laravel but just installed a fresh installation of Laravel 5.1 on Homestead/Vagrant according to the docs.
When I do npm install, I get this warning:
vagrant@homestead:~/Code/Laravel$ sudo npm install
npm WARN optional dep failed, continuing [email protected]
npm WARN engine [email protected]: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.37","npm":"1.4.28"})
Is it safe to upgrade node.js and if yes, how? I read some articles where people destroyed their vagrant installation so I am afraid to do that. Any hints?
Upvotes: 0
Views: 3503
Reputation: 126
Look at:
Installing Node.js v0.12 Debian / Ubuntu repository
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install -y nodejs
Upvotes: 1
Reputation: 2476
Node js > 0.12.0 is very supported, since it is around since a long time. you can upgrade.
But why do you do npm install in laravel, isn't it a PHP framework? In the install procedure in their website they don't mention npm, maybe I'm wrong.
EDIT: To manage node.js versions you can use nvm
https://github.com/creationix/nvm
This allows you to switch between versions easily, and install any version available without any issue. You can even set different versions for different paths.
Upvotes: 1