简体   繁体   English

无法从“node_modules/expo/build/ExpoLazy.js”解析模块“./Linking/Linking”

[英]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.

相关问题 无法从 `node_modules\react-redux\lib\connect\mapDispatchToProps.js` 解析模块 `../../../../src/redux` - Unable to resolve module `../../../../src/redux` from `node_modules\react-redux\lib\connect\mapDispatchToProps.js` 无法从“node_modules\@firebase\app\dist\esm\index.esm2017.js”解析“idb” - Unable to resolve "idb" from "node_modules\@firebase\app\dist\esm\index.esm2017.js" 找不到模块 node_modules\@react-native-community\cli\build\bin.js' - Cannot find module node_modules\@react-native-community\cli\build\bin.js' 忽略cordova构建上的node_modules - ignore node_modules on cordova build 无法从“App.js”解析“expo-app-loading” - Unable to resolve “expo-app-loading” from “App.js” Phonegap / Cordova构建android node_modules / q / q.js throw e; - Phonegap/Cordova build android node_modules/q/q.js throw e; 错误:需要模块“node_modules\react-native-reanimated\src\Animated.js” - Error: Requiring module "node_modules\react-native-reanimated\src\Animated.js" Gaxios._request 中的值无效 (/srv/node_modules/googleapis-common/node_modules/gaxios/build/src/gaxios.js:89:23) - Invalid Value at Gaxios._request (/srv/node_modules/googleapis-common/node_modules/gaxios/build/src/gaxios.js:89:23) 世博会和链接到mailto的问题 - Having issues with expo and linking to mailto Gulp Cordova构建android错误-node_modules-gulp-jscs-index.js:99:-RangeError:无效的字符串长度 - Gulp Cordova build android error - node_modules - gulp-jscs - index.js:99 :- RangeError: Invalid string length
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM