离子科尔多瓦准备与node_modules问题

时间:2020-04-22 23:44:08

标签: ionic-framework

当我运行ionic cordova prepare ios / android时,我遇到了错误和未定义moment的错误。

从这里开始执行以下步骤

1 .- Remove package-lock.json and yarn.lock
2 .- Install the "moment": "^2.24.0"
3 .- Remove the node_modules folder with `rm -rf node_modules`
4 .- Remove package-lock.json and yarn.lock (again)
5 .- Install node modules with `yarn`

然后我执行ionic cordova prepare ios并且构建成功,但是当我尝试再次运行该命令时,moment文件夹中的node_modules文件夹消失了,有什么方法可以防止这种情况?

我正在使用"@ionic-native/core": "^4.4.0",不想升级它。有些软件包与此版本不兼容

0 个答案:

没有答案