It’s been several times that I’m trying to even create an Ionic project, but with no success.
I’m on Elementary OS Freya and I:
- Installed Node.js with 3 different methods, trying all the versions. I tried with the version in the repositories (the legacy and the non-legacy one) then I tried following these instructions https://nodejs.org/en/download/package-manager/, then I tried downloading the tarball from the Node.js homepage and copying the files in my system. Both with version 4.x and 5.x
- Installed cordova and ionic using npm (every time I reinstalled node.js, I cleaned up everything and started from scratch) with the command line given in the “Getting started” page (
sudo npm install -g cordova ionic
) - Run the command to create a project, like
ionic start myApp sidebar
Every time, in every possibile combination of node.js version and install method, I get this (in the last step):
$ ionic start myApp sidemenu
module.js:327
throw err;
^
Error: Cannot find module 'xmlbuilder'
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/xml2js/lib/xml2js.js:12:13)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:436:4)
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)
So I tried installing the missing package with npm, using npm install -g xmlbuilder
, but another “missing package” error came up, with another package. I started manually installing all of them, but the list was endless and I started to get tired, so I gave up. And, by the way, I don’t think I’m supposed to install every dependency manually.
What am I supposed to do to get a simple Ionic app running?
Thanks in advance.