捆绑失败:错误:无法解析模块`./$。html`

时间:2018-06-10 08:16:46

标签: reactjs react-native bundle

我尝试运行我的项目,但是我收到以下错误: 捆绑失败:

Error: Unable to resolve module `./$.html` from `/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/core-js/modules/es5.js`: The module `./$.html` could not be found from `/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/core-js/modules/es5.js`. Indeed, none of these files exist:

  * `$.html`
  * `/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/core-js/modules/$.html/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)`
    at ModuleResolver.resolveDependency (/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:161:851)
    at ResolutionRequest.resolveDependency (/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:91:16)
    at DependencyGraph.resolveDependency (/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:272:4579)
    at dependencies.map.relativePath (/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:376:19)
    at Array.map (<anonymous>)
    at resolveDependencies (/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:374:16)
    at /Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:212:33
    at Generator.next (<anonymous>)
    at step (/Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:313)
    at /Safee/sf-code/sf-safee-clients/sf-client-mobile/node_modules/react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:473

我的捆绑卡在中间。

可能是什么问题?

1 个答案:

答案 0 :(得分:2)

我已解决问题,方法是转到node_modules/core-js/modules/$.html.js,然后将$.html.js复制并重命名为$.html

它将解决您的问题。

enter image description here