0

I had a makeshift setup on Lubuntu that 'functioned' with sudo npm install. I used Ionic Framework generator to create projects and they functioned as well as the builds and deployment. I upgraded to 15.04 and ever since had problems finding a solution that worked does not give EACCESS errors or grunt serve telling me

Upgrade warning - for the CLI to run correctly,
it is highly suggested to upgrade the following:

Please update your Node runtime to version >=0.12.x Please update your Cordova CLI to version >=4.2.0 npm install -g cordova

then for npm install -g cordova to tell me

npm WARN engine cordova-serve@0.1.3: wanted: {"node":">= 0.12.0","npm":">= 2.5.1"} (current: {"node":"0.10.26","npm":"2.12.1"})

I have tried the "chown -R whoami /dir/of/npm" I have delete npm, node install brew and created new installs for all. I still get EACCESS errors, my yo ionic "grunt serve" deploys the browser but gives ERR_CONNECTION_REFUSED I installed brew, manually deleted the npm folder and did a clean install. No joy

which node - /home/username/.nvm/v0.10.26/bin/node

node -v v0.10.26

which npm - /home/userna/.linuxbrew/bin/npm

npm -v 2.12.1

which cordova - /usr/local/bin/cordova

cordova -v 3.5.0-0.2.6

And for good meassure i thought if i installed node4 all my troubles would disappear.

I know i messed this up but i would like a clean start with node, npm(without sudo) and cordova. Any help would be appreciated

Ps: I have done most of the normal suggestions hence my question.

Community
  • 1
  • 1
petrivoges
  • 79
  • 1
  • 10

1 Answers1

0

Did you installed node using nvm? So try

nvm use 4.0.0

In general:

nvm install [VERSION]
nvm use [VERSION]

To use permanent:

nvm alias default [VERSION]

try also to install cordova again after updating node

npm install -g cordova

If all fails:

Uninstall node and reinstall propper using brew:

cd ~
sudo rm -rf .npm
brew update
brew uninstall npm
brew install npm
Karl Adler
  • 15,780
  • 10
  • 70
  • 88
  • I used brew to install node and nvm. I'll update nvm to 4.0.0 and see if there is a change. – petrivoges Sep 17 '15 at 13:51
  • should work. I updated my answer, because on some systems nvm "forgets" on terminal restart what's the current version, so you should set one as default. – Karl Adler Sep 17 '15 at 14:09
  • Thanks for you answers @abimelex, but all the errors still persist after implementing your suggestions – petrivoges Sep 17 '15 at 14:33
  • mh what gives you `node -v` ? If it's still not 4.0.0 reinstall it as mentioned above. – Karl Adler Sep 17 '15 at 15:16
  • node -v v0.12.7 Everything is still the same. grunt serve within my dir repsonds with ERROR Warning: Unable to delete "www/bower_components" file (EACCES, – petrivoges Sep 18 '15 at 11:34