[英]Unable to resolve module `./Linking/Linking` from `node_modules/expo/build/ExpoLazy.js`
Has anyone experience this error with expo, when running react-native run-android
?有没有人在运行
react-native run-android
时遇到 expo 的这个错误?
error: bundling failed: Error: Unable to resolve module `./Linking/Linking` from `node_modules/expo/build/ExpoLazy.js`:
None of these files exist:
* node_modules/expo/build/Linking/Linking(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
* node_modules/expo/build/Linking/Linking/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
"expo": "^37.0.9", “世博”:“^37.0.9”,
Just ran into this issue, downgrade to 37.0.8 (no caret) and do an npm i
.刚刚遇到这个问题,降级到 37.0.8(没有插入符号)并执行
npm i
。 Looks like they released 37.0.9 yesterday and it has an issue.看起来他们昨天发布了 37.0.9 并且有问题。
What worked for me:什么对我有用:
1) In package.json change to "expo": "37.0.8"
2) Delete your node_modules 3) installl packages npm i
4) clean cache in expo expo r -c
1) In package.json change to
"expo": "37.0.8"
2) Delete your node_modules 3) installl packages npm i
4) clean cache in expo expo r -c
Now it started to work again.现在它又开始工作了。 Couldn't find the last step in previous comments.
在之前的评论中找不到最后一步。
This is an Internal bug of react-native.这是 react-native 的内部错误。 You don't have much of a choice, as user3916570 consider downgrading.
您没有太多选择,因为 user3916570 考虑降级。
For now, downgrading Expo to 37.0.8 fixed this.目前,将 Expo 降级到 37.0.8 可以解决此问题。 To downgrade, in your package.json, change your Expo dependency to:
要降级,在 package.json 中,将 Expo 依赖项更改为:
"expo": "37.0.8",
Then remove your node_modules and reinstall everything:然后删除您的 node_modules 并重新安装所有内容:
rm -rf node_modules
npm i
It's not an expo version problem only, you should also check the global expo-cli version and probably node as well.这不仅仅是 expo 版本问题,您还应该检查全局 expo-cli 版本和可能的节点。 Run:
跑:
$ npm install -g expo-cli --force
$ rm -rf node_modules/
$ rm -rf package-lock.json
# (in my case mac '$ brew upgrade node && npm install -g npm')
$ npm install
$ npm run
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.