运行ionic cordova命令会出错 - 无法找到模块' ./ cordova'

时间:2017-10-29 17:28:22

标签: git cordova github ionic-framework build

我刚下载了之前的github提交,我运行了npm install但是当我尝试运行ionic cordova ...时,它说:

Error: Cannot find module './cordova'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at /Users/eamonwhite/ionicmane-re/node_modules/ionic/dist/commands/index.js:16:165

当我尝试ionic serve时,它说:

Error: Cannot find module './build/util'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/eamonwhite/ionicmane-re/node_modules/@ionic/app-scripts/dist/build.js:3:14)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

我已经在全球范围内安装了cordova,我们将非常感谢任何帮助 - 我正在逆时针工作。

更新

一个新的:

Eamons-MBP:ionicmane-re eamonwhite$ ionic package build ios
Error: Cannot find module './common'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/eamonwhite/ionicmane-re/node_modules/ionic/dist/commands/package/index.js:6:18)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

1 个答案:

答案 0 :(得分:0)

我使用npm进行了全新安装,但效果很好。