ika*_*ita 8 reactjs react-native
我在运行react-native run-ios时遇到一个问题,以下消息显示,并且我认为它与babel有关:
有人已经有这个问题了吗?
"GET /index.bundle?platform=ios&dev=true&minify=false HTTP/1.error: bundling failed: Error: Unable to resolve module `@babel/runtime/helpers/interopRequireDefault` from `/Volumes/SD/react/PropertyFinder/index.js`: Module `@babel/runtime/helpers/interopRequireDefault` does not exist in the Haste module map
Run Code Online (Sandbox Code Playgroud)
谢谢
有时,不同的程序使用相同的端口,例如80,8080或8081,当我遇到此问题时,我将默认端口设置为8088。
尝试
react-native run-ios --port=8088
如果更改端口不起作用,请尝试此操作。这会将@ babel / runtime软件包安装到您的项目中。
npm add @babel/runtime
npm install
之后,重新编译您的项目。
我希望它能起作用。
小智 5
有效的解决方案:
rm -rf ios/build/; kill $(lsof -t -i:8081)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7105 次 |
| 最近记录: |