在将Expo SDK 33更新到34之后,我开始注意到一些expo npm包必须至少是v6.0.0的错误……
$ expo start -c
Starting project at /Users/nyxynyx/expoapp
Expo DevTools is running at http://localhost:19002
Some of your project's dependencies are not compatible with currently installed expo package version:
- expo-ads-admob - expected version range: ~6.0.0 - actual version installed: ^5.0.1
- expo-analytics-amplitude - expected version range: ~6.0.0 - actual version installed: ^5.0.1
- expo-barcode-scanner - expected version range: ~6.0.0 - actual version installed: ^5.0.1
- expo-permissions - expected version range: ~6.0.0 - actual version installed: ^5.0.1
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
...继续更新这些包
$ npm install --save expo-ads-admob expo-analytics-amplitude expo-barcode-scanner expo-permissions
npm WARN The package react-native-dotenv is included as both a dev and production dependency.
+ expo-permissions@5.0.1
+ expo-ads-admob@5.0.1
+ expo-analytics-amplitude@5.0.1
+ expo-barcode-scanner@5.0.1
updated 4 packages and audited 38421 packages in 5.052s
found 11 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details我还尝试使用以下命令清除缓存:
rm -rf node_modules
npm cache clean
npm install
watchman watch-del-all
rm -fr $TMPDIR/metro*
expo start -c但是,同样的关于需要v6.0.0+的警告消息也存在。该应用程序似乎可以在世博会iOS客户端运行正常(条形码扫描仪等)。我们该怎么办?
发布于 2019-07-30 23:15:46
如果你使用的是Expo,我不认为这是正确的安装方式。如果您想从Expo安装您自己的模块,请使用以下命令。
示例
expo install expo-ads-admob发布于 2022-02-07 07:26:38
修复方法是在项目文件夹上运行"expo update“。
https://stackoverflow.com/questions/57274862
复制相似问题