I have some issues with running Ionic in Ubuntu. My attempts to troubleshoot didn’t go well. I have asked on multiple forums, even here ( Unable to make Ionic work in Ubuntu 14.04 ) without success.
Can someone guide me install Ionic 2 in Ubuntu 14.04 please ?
I get the following error ( was the same with Ionic 1 as well )
ionic start myApp1 blank
module.js:327
throw err;
^
Error: Cannot find module 'archiver'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/utils.js:3:16)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
After using npm install -g ionic@beta cordova , I got the following error in the end
npm ERR! Please include the following file with any support request:
npm ERR! /home/dna/npm-debug.log
It seems to me that’s kind of messed up your node installation.
the best thing to do is to give a search on google to completely remove the node and everything attached to it (as npm, nvm, if you installed ruby, rails, etc …).
then install again put as before, leaving a cleaner and easy to update installation.
I really have no idea I never completely remove node.
I know the links that I sent just above work well because at least 2 times a month format my machine (stupid habit I have) and that model has always worked.
a quick search here returned this link on stackoverflow, commands and apparently works for the votes they received.
I am getting this after completely removing and reinstalling nodejs and npm
npm ERR! Linux 3.13.0-85-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ionic@beta" "cordova"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
npm ERR! path /usr/lib/node_modules/.staging/abbrev-0f758453
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/abbrev-0f758453' -> '/usr/lib/node_modules/cordova/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/abbrev-0f758453' -> '/usr/lib/node_modules/cordova/node_modules/npm/node_modules/abbrev'
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! Please include the following file with any support request:
npm ERR! /home/dna/npm-debug.log
Error: Cannot find module ‘archiver’
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/utils.js:3:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions…js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
sorry, but this time I do not even know how to try to help. I’ve never seen this error and what googled here ‘module.js: 341 throw err;’ and ‘Error: Can not find module’ archiver ‘’ showed that several people had this error.
I think it’s for these reasons that I’m slightly paranoid and I’m always re-installing Linux (edit: my bad, I wrote in portuguese)
Hi
I recently installed Ubuntu and Ionic. I dont know what I did wrong, but could not get Node running using packages, so used the direct download stuff from the nodejs.org site and then Node was doing fine.
So what I did: clean install Ubuntu, installed Node using nodejs.org installer and then did sudo npm install -g ionic@beta.
Not sure if this helps but at least less effort compared to clean Ubuntu install.
From my experience it’s very important to have right versions (best the latest) of everything. I have version 4.4.3 of nodejs and version 2.15.1 of npm. Mine are not the latest, but it works for me, so I don’t touch it unless I have very important reason.
To remove old version use:
sudo apt-get --purge autoremove node
In general, my suggestion at this point would be to try to remove all involved packages (nodejs, npm, curl, ionic, etc I mean EVERYTHING). Use “–purge autoremove” option, since it clears the environment better (at least it worked for me). After that install from clean. I’m not sure what exactly is going on with your environment, but it seems pretty much messed up with old installations.