我在世博会项目中遇到了这个错误。
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我试过我能找到的修复方法,但没有一个对我有用。我试着清除缓存,创建一个新项目,复制和粘贴现有项目的文件,但仍然遇到同样的问题。任何帮助都非常感谢。
发布于 2022-06-05 07:33:46
你必须手动清除缓存,
打开项目folder.
npm install命令重新安装。https://stackoverflow.com/questions/72503537
复制相似问题