我有一个Ionic Cordova应用程序,最近开始收到此错误:
(node:1897) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'simple-plist'
我做了什么:
它只在package-lock.json中显示为cordova-ios
的依赖项。
"simple-plist": {
"version": "0.2.1",
"bundled": true,
"requires": {
"bplist-creator": "0.0.7",
"bplist-parser": "0.1.1",
"plist": "2.0.1"
},
"dependencies": {
"base64-js": {
"version": "1.1.2",
"bundled": true
},
"plist": {
"version": "2.0.1",
"bundled": true,
"requires": {
"base64-js": "1.1.2",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.27"
}
},
"xmlbuilder": {
"version": "8.2.2",
"bundled": true
}
}
},
...
"xcode": {
"version": "0.9.3",
"bundled": true,
"requires": {
"pegjs": "0.10.0",
"simple-plist": "0.2.1",
"uuid": "3.0.1"
}
},
答案 0 :(得分:1)
在尝试了你给出的建议后,我在重新添加ios平台时收到了同样的错误。我能够通过运行以下命令来修复它
npm install simple-plist
答案 1 :(得分:0)
在我执行以下步骤后问题消失了:
node_modules
npm i