我突然收到模块“ fs”无法解决的错误。但是我没有使用此模块,也没有更改任何内容。我的应用程序启动时突然返回此错误。
错误:捆绑失败:错误:无法解析模块
fs从/Path/to/Project/node_modules/handlebars/lib/index.js:模块fs不会在急速模块地图存在这可能与https://github.com/facebook/react-native/issues/4968有关要解决此 问题,请尝试以下操作:
- 清除看门人手表:
watchman watch-del-all。- 删除
node_modules文件夹:rm -rf node_modules && npm install。- 重置Metro Bundler缓存:
rm -rf /tmp/metro-bundler-cache-*或npm start -- --reset-cache。- 删除急速缓存:
rm -rf /tmp/haste-map-react-native-packager-*。
我已经尝试了四个步骤来解决,但没有任何帮助。任何想法可能有什么问题吗?