Saturday, March 12, 2016

NodeJS + Ionic : Fixing " Error: Cannot find module 'xmlbuilder' "

$ ionic start todo blank
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. (/usr/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:12:13)
at Object. (/usr/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)


Solution :
$ sudo npm install -g bplist-parser xmlbuilder

1 comment:

  1. You should check your version of nodejs. Make sure that it's version 4. If not, uninstall nodejs and install ver 4.
    Goodluck!
    P/s:
    Uninstall:

    sudo apt-get remove nodejs

    Install:

    curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
    sudo apt-get install -y nodejs

    ReplyDelete