Install ionic2 issue


#1

Hello, I try to install ionic2 on my Lubuntu OS, but when I launch the command :

npm install -g ionic@beta
I have this error :
gyp ERR! configure error
gyp ERR! stack Error: ENOSPC, mkdir '/usr/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/gulp-sass/node_modules/node-sass/.node-gyp'
gyp ERR! System Linux 4.2.0-16-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
Build failed
/usr/lib
└── (empty)
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic@beta"
npm ERR! node v0.10.25
npm ERR! npm v3.8.0
npm ERR! code ELIFECYCLE
npm ERR! node-sass@3.4.2 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.4.2 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/khoya/npm-debug.log

Can someone help me ?
Thanks


#2

please post your ionic info


#3

I don’t have ionic because I try to install ionic and the install failled


#4

without ionic you not able to build ionic apps .
do you have nodejs and cordova CLI ? if not ,please follow bellow steps

so first install latest
1 nodeJs
2 install cordova CLI .read cordova installation guide here
2 install Ionic npm install -g ionic@beta


#5

Thank you for your reply, I have the latest nodeJs version but I didn’t have cordova, I install it but now when I try to install ionic 2 I have new errors message :
npm ERR! tar.unpack untar error /root/.npm/ionic/2.0.0-beta.19/package.tgz
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv “node” “/usr/local/bin/npm” “install” “-g” "ionic@beta"
npm ERR! node v0.10.25
npm ERR! npm v3.8.0
npm ERR! code ENOSPC
npm ERR! errno 54

npm ERR! nospc ENOSPC, write
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv “node” “/usr/local/bin/npm” “install” “-g” "ionic@beta"
npm ERR! node v0.10.25
npm ERR! npm v3.8.0
npm ERR! code ENOSPC
npm ERR! errno 54

npm ERR! nospc ENOSPC, write
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv “node” “/usr/local/bin/npm” “install” “-g” "ionic@beta"
npm ERR! node v0.10.25
npm ERR! npm v3.8.0
npm ERR! path npm-debug.log.1286456778
npm ERR! code ENOENT
npm ERR! errno 34

npm ERR! enoent ENOENT, rename 'npm-debug.log.1286456778’
npm ERR! enoent ENOENT, rename 'npm-debug.log.1286456778’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! tar.unpack untar error /root/.npm/ionic/2.0.0-beta.19/package.tgz
npm ERR! tar.unpack untar error /root/.npm/ionic/2.0.0-beta.19/package.tgz

npm ERR! Please include the following file with any support request:
npm ERR! /home/khoya/npm-debug.log


#6

Looks like you don’t have enough space on your disk ?


#7

By dint of hack to fix this problem , I “broke” my lubuntu who does not want to start , I’ll have to reinstall lubuntu .
But for those who have this concern , apparently I did not have the latest version of nodejs .
So Kuntal was right I think …

EDIT :
I reinstalled Lubuntu, and I did all that said kuntal and it worked.
But you must do all the commands prefixed by "sudo ".