Lots of missing modules when I try to create an app


#1

Hi all! I’ve just installed Ionic according to the getting started page, but I can’t seem to create any app at all. Every time I try it, it always accuses of some missing module. Here’s the error:

charles@charles-note-ubuntu:~/Dropbox/IonicProjects$ ionic start myApp sidemenu

Error: Cannot find module 'read'
    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/prompt/lib/prompt.js:12:12)
    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)
    at require (internal/module.js:12:17)

Cannot find module 'read' (CLI v1.7.14)

Your system information:

Cordova CLI: 4.3.1
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
OS: Distributor     ID:	Ubuntu     Description:	Ubuntu 14.04.4 LTS 
Node Version: v4.3.1

What I’ve tried so far:
reinstalling (with npm install -g) all the packages I can think of: ionic, cordova, update, config-chain…

It might be something wrong with my node installation? because since I haven’t found any specific oficial instructions, I’ve just unpacked it on my home folder and added node bin subfolder to the $PATH variable.

Am I missing something here?


#2

Try updating npm with the following:
npm install -g npm

Then, run install on at least ionic and cordova again.