英文:
How to remove error: bundling failed: ReferenceError: SHA-1 for file is not computed
问题
I've tried to connect mysql with my react-native app. I install express, body-parser, and mysql also. Then I create server.js in my project and type "node server.js" in the terminal. Then I get this error:
错误: 打包失败: 引用错误: /usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) 的SHA-1未计算
I don't know what this is and how to solve this error. Please help me with this error...
Note: I'm using Ubuntu.
英文:
I've tried to connect mysql with my react-navtive app. I install express, body-parser and mysql also then I create server.js in my project and type "node server.js" cmd on terminal then I get this error
error: bundling failed: ReferenceError: SHA-1 for file /usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/usr/local/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) is not computed
I don't know what is this and how to solve this error please help me with this error...
Note: I'm using ubuntu
答案1
得分: 3
你的react-native-cli版本是多少?
也许需要更新react-native-cli:
npm i -g react-native-cli
英文:
What's your react-native-cli version?
Perhaps, update the react-native-cli:
npm i -g react-native-cli
答案2
得分: 0
尝试使用以下命令运行:
npm run start --reset-cache 或者 react-native start --reset-cache
英文:
Try running using this
npm run start --reset-cache OR react-native start --reset-cache
答案3
得分: 0
对我来说,问题出在我的目录文件夹中有一个 .
,所以将 example.com
改为 examplecom
解决了我的问题。
英文:
For me it twas the fact that I had a .
in my directory folder so example.com
to examplecom
had fixed the issue for me
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论