在构建离子应用程序时找不到模块'xmlbuilder'

时间:2016-03-27 09:57:41

标签: node.js ionic-framework

执行时

ionic start myApp tabs

我收到以下错误

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)

node -v提供v4.4.1 npm -v提供2.14.20

我已完成npm install xmlbuilder

1 个答案:

答案 0 :(得分:1)

请将xmlbuilder模块安装到全局环境:

npm install -g xmlbuilder