简体   繁体   English

负载捆绑8081的解决方法失败后,react native无法找到package.json

[英]react native can't find package.json after workaround for load bundle 8081 failed

Facing this error 面对这个错误

Failed to load bundle( http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:(Unable to resolve module (see pic below). Indeed, none of these files exist: 无法加载捆绑包( http:// localhost:8081 / index.bundle?platform = ios&dev = true&minify = false :(无法解析模块(请参见下图)。实际上,这些文件都不存在:

iOS Simulation Error iOS模拟错误

Other forums suggested workaround using 其他论坛建议使用的解决方法

rm ./node_modules/react-native/local-cli/core/ fixtures /files/package.json rm ./node_modules/react-native/local-cli/core/ 固定装置 /files/package.json

Now I see the following error in terminal: 现在,我在终端中看到以下错误:

No such file or directory 没有相应的文件和目录

How do I create this package.json? 如何创建这个package.json? What is causing the localhost error and how can I fix this? 是什么原因导致localhost错误,我该如何解决?

I am facing the same issue. 我正面临着同样的问题。 The file you pointed to is probably this - rm node_modules/react-native/local-cli/core/__fixtures__/files/package.json 您指向的文件可能是这样rm node_modules/react-native/local-cli/core/__fixtures__/files/package.json

However, doing this didnt resolve my issue. 但是,这样做不能解决我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM