Sandro Palmieri
Sandro Palmieri

Reputation: 1203

Installation issue with Ionic

when I try to install ionic via npm I get the following issue. The installation just stops when trying to install the node-sass package. This is what I get from the command line:

npm info install [email protected]

> [email protected] install /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass
> node scripts/install.js

/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova

The installation process just stops at this point. During installation, I've used the loglevel option to track the logs. Any ideas about what can be the cause of this error? Thanks Sandro

Upvotes: 2

Views: 226

Answers (1)

RKosamia
RKosamia

Reputation: 191

Hope this will help you.

if the last line of your cmd shows : /usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova

then its permission issue.

sudo chown -R *username*/usr/local/lib/node_modules/cordova/

if there is any issues with node-saas

It's trying to force [email protected]
You Can Try using npm install node-sass to get the latest version(3.4.2). OR

When i got problems with node-saas , friend on github helped me with using libsass commands:

   $ sudo rm -rf node_modules/ && cat package.json | sed -i.bak 's/"gulp-sass": "^X.X.X"/"gulp-sass": "^3.4.1"/g' package.json && npm install && ionic lib update

Where X is the version of gulp-sass in your package.json

Remove the old files in node_modules. I'm not sure is necessary to use 'sudo'

$ sudo rm -rf node_modules/

Search and replace inside package.json updating gulp-sass version to ^3.4.1. It also creates a backup (package.json.bak),

$ cat package.json | sed -i.bak 's/"gulp-sass": "^X.X.X"/"gulp-sass": "^3.4.1"/g' package.json

Reinstall dependencies

$ npm install

Update the ionic lib in the project

ionic lib update

Upvotes: 2

Related Questions