【问题标题】:react-transform-hmr/lib/index.js could not be foundreact-transform-hmr/lib/index.js 找不到
【发布时间】:2018-12-30 15:34:48
【问题描述】:

当我在 react native android 中运行我的项目时,我遇到了这个问题

错误:在以下位置找不到模块“react-transform-hmr/lib/index.js” Function.Module._resolveFilename (module.js:325:15) 在 Function.require.resolve (internal/module.js:16:19) 在 makeMakeHMRConfig7 (/home/local/MPLLC/malwinder.singh/demoApp/node_modules/react-native/node_modules/metro/src/babel-bridge.js:120:31) 在对象。 (/home/local/MPLLC/malwinder.singh/demoApp/node_modules/react-native/node_modules/metro/src/babel-bridge.js:49:24) 在 Module._compile (module.js:409:26) 在 Module._extensions..js (module.js:416:10) 在 Object.require.extensions.(匿名函数) [作为.js] (/home/local/MPLLC/malwinder.singh/demoApp/node_modules/react-native/node_modules/babel-register/lib/node.js:152:7) 在 Module.load (module.js:343:32) 在 Function.Module._load (module.js:300:12) 在 Module.require (module.js:353:17) 在 require (内部/module.js:12:17)

【问题讨论】:

  • 你修好了吗?
  • 下面的答案对我来说绝对没问题

标签: react-native react-native-android


【解决方案1】:

这是 react transform hmr 的问题,您必须运行此命令。

npm install react-transform-hmr --save

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2019-03-10
  • 1970-01-01
  • 2019-09-04
  • 2021-09-21
  • 2019-03-03
  • 2019-04-17
  • 2021-10-28
  • 2021-12-03
相关资源
最近更新 更多