我刚刚在博览会日志上构建我的应用程序时看到了该警告。然后我在当地运行 expo doctor 并出现以下警告。我尝试删除 package-lock.json 和节点模块,然后运行“npm install”但无法修复它。有什么办法可以解决吗?
\nexpo doctor log:\n\n \xe2\x88\x9a Found all copies of expo-modules-autolinking\n Expected package expo-modules-autolinking@~0.8.1\n Found invalid:\n expo-modules-autolinking@0.5.5\n (for more info, run: npm why expo-modules-autolinking)\n \n \xe2\x88\x9a Found all copies of @expo/config-plugins\n Expected package @expo/config-plugins@^4.1.0\n Found invalid:\n @expo/config-plugins@4.0.18\n (for more info, run: npm why @expo/config-plugins)\n \n \xe2\x88\x9a Found all copies of @expo/prebuild-config\n Expected package @expo/prebuild-config@^4.0.0\n Found invalid:\n @expo/prebuild-config@3.1.6\n (for more info, run: npm why @expo/prebuild-config)\n \n Didn\'t find any issues with the project!\nRun Code Online (Sandbox Code Playgroud)\n包.json
\n"@expo/config-plugins": "^4.1.5",\n"@expo/prebuild-config": "^4.0.0",\n"expo-modules-autolinking": "~0.8.1",\nRun Code Online (Sandbox Code Playgroud)\n
Nee*_*erO 10
大家好,只需在您的package.json文件(您项目的根目录)中添加以下代码即可。然后删除你的项目内的所有node_module文件。
"resolutions": {
"@expo/config-plugins": "^4.1.0",
"@expo/prebuild-config": "^4.0.0",
"expo-modules-autolinking": "~0.8.1"
}
Run Code Online (Sandbox Code Playgroud)
小智 0
将此行放入您的 package.json 中:
"resolutions": {
"expo-modules-autolinking": "~0.8.1"
},
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11632 次 |
| 最近记录: |