我将Cordova
从8.1.1
升级到9.0.0
,并且在构建Android
应用时,出现以下错误:
{ Error: Cannot find module 'nopt'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/gabriela.banica/Projects/SmartHome-UI-Core/dist/innogy/essen-test/android/platforms/android/cordova/lib/build.js:25:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at /Users/gabriela.banica/Projects/SmartHome-UI-Core/dist/innogy/essen-test/android/platforms/android/cordova/Api.js:304:16
at _fulfilled (/Users/gabriela.banica/Projects/SmartHome-UI-Core/dist/innogy/essen-test/android/node_modules/q/q.js:854:54)
at /Users/gabriela.banica/Projects/SmartHome-UI-Core/dist/innogy/essen-test/android/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (.../android/node_modules/q/q.js:816:13)
at .../android/node_modules/q/q.js:624:44
at runSingle (.../android/node_modules/q/q.js:137:13)
at flush (.../android/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11) code: 'MODULE_NOT_FOUND' }
任何想法如何解决?
答案 0 :(得分:0)
尝试再次删除/添加平台
SOCKET