2
我正在嘗試將iOS平臺更新到4.1.0以支持我的Ionic應用程序。但是我在運行平臺添加命令 離子平臺添加[email protected]時出現錯誤。離子錯誤:在添加平臺時無法找到模塊「下劃線」[email protected]
module.js:338
throw err;
^
Error: Cannot find module 'underscore'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/harish/.cordova/lib/npm_cache/cordova-ios/4.1.0/package/node_modules/cordova-common/src/superspawn.js:23:9)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
Error: /Users/harish/.cordova/lib/npm_cache/cordova-ios/4.1.0/package/bin/create: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
這裏是我的系統信息:
Cordova CLI: 5.1.1 Ionic CLI Version: 1.7.14 Ionic App Lib Version: 0.7.0 ios-deploy version: 1.8.2 ios-sim version: 4.1.1 OS: Mac OS X El Capitan Node Version: v0.12.7 Xcode version: Xcode 7.3 Build version 7D175
感謝
Soumen
謝謝@Xavier的回覆。其實我在我的項目中更新了科爾多瓦和離子氣候系統。之後,我做了離子平臺添加ios和我的iOS平臺更新至4.2.0。但是我肯定會嘗試你的解決方案。 –