我的离子项目突然没有响应任何Cordova构建/运行命令。
Macbooks-MBP:upost Kira$ cordova run ios
Error: variables.forEach is not a function
Macbooks-MBP:upost Kira$ cordova run android
Error: variables.forEach is not a function
Macbooks-MBP:upost Kira$ cordova build ios
Error: variables.forEach is not a function
Macbooks-MBP:upost Kira$ cordova build android
Error: variables.forEach is not a function
Macbooks-MBP:upost Kira$
这是Cordova -d build ios
回复
Macbooks-MBP:upost Kira$ cordova -d build ios
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform ios
Checking config.xml for saved plugins that haven't been added to the project
Error: variables.forEach is not a function
我尝试过的步骤:
组件版本:
答案 0 :(得分:0)
删除ios-sim
platforms/cordova/node_modules/
输入命令npm i -g install ios-sim@latest
以及npm i -g install ios-deploy@latest
然后Cordova build ios
或Cordova run ios
将起作用