Cannot find module 'minizlib'

佐手、 提交于 2019-12-20 02:57:21

问题


I am pretty new to React-Native. I install react-native on my Mac using the code below:

npm install react-native -g react-native-cli

I got the error:

npm ERR! code MODULE_NOT_FOUND
npm Err! Cannot find module 'minizlib'

Anyone can help me to solve this problem please?


回答1:


I had the same problem

npm i minizlib --global

This helped me




回答2:


New to this myself as a disclaimer but you may want to try uninstalling node.

If you installed node with Homebrew try...

$ brew uninstall node $ brew install node




回答3:


Try this

brew install node
brew install watchman
npm install -g react-native-cli
react-native init AwesomeProject

Follow the exact steps in https://facebook.github.io/react-native/docs/getting-started.html in the Building Projects with Native Code tab.



来源:https://stackoverflow.com/questions/48495253/cannot-find-module-minizlib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!