ionic Error: Cannot find module 'underscore' while adding platform ios@4.1.0
ionic Error: Cannot find module 'underscore' while adding platform ios@4.1.0
我正在尝试将我的 Ionic 应用程序的 IOS 平台更新到 4.1.0。但是我在 运行 平台添加命令时遇到错误
离子平台添加 ios@4.1.0.
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
谢谢
搜门
我也遇到同样的问题。 (尝试为我的离子项目实施推送通知)
我安装了下划线:
cd ~/.cordova/lib/npm_cache/cordova-ios/4.1.0/package/node_modules/
npm install underscore
然后更新到4.1.0:cordova platform update ios@4.1.0
之后你就可以ionic build ios
完美了!
我正在尝试将我的 Ionic 应用程序的 IOS 平台更新到 4.1.0。但是我在 运行 平台添加命令时遇到错误 离子平台添加 ios@4.1.0.
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
谢谢
搜门
我也遇到同样的问题。 (尝试为我的离子项目实施推送通知)
我安装了下划线:
cd ~/.cordova/lib/npm_cache/cordova-ios/4.1.0/package/node_modules/
npm install underscore
然后更新到4.1.0:cordova platform update ios@4.1.0
之后你就可以ionic build ios
完美了!