参考:可以找到变量:需要博览会

发布于 2025-02-05 02:24:05 字数 985 浏览 2 评论 0原文

我在博览会项目中遇到了这个错误

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

I 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水中月 2025-02-12 02:24:05

您必须手动清除缓存,

  1. 打开项目文件夹。
  2. 手动删除所有节点模块。
  3. 然后通过在您的
    终端。

You have to manually clear the caches ,

  1. Open your project folder.
  2. Manually delete all the node modules.
  3. Then reinstall all of them by using the npm install command in your
    terminal.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文