参考:可以找到变量:需要博览会
我在博览会项目中遇到了这个错误
ReferenceError: Can't find variable: require
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules/metro-runtime/src/polyfills/require.js:203:6 in guardedLoadModule
at http://192.168.1.228:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:479020:3 in global code
I tried the fixes I could find but none of them worked for me. I tried clearing the cache, creating a new project and copy and pasting the file of the existing project but I still get the same issue. Any help is much appreciatedI am getting this error in my expo project
ReferenceError: Can't find variable: require
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules/metro-runtime/src/polyfills/require.js:203:6 in guardedLoadModule
at http://192.168.1.228:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:479020:3 in global code
I tried the fixes I could find but none of them worked for me. I tried clearing the cache, creating a new project and copy and pasting the file of the existing project but I still get the same issue. Any help is much appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须手动清除缓存,
终端。
You have to manually clear the caches ,
npm install
command in yourterminal.