【发布时间】:2020-01-11 14:05:20
【问题描述】:
在https://github.com/react-community/create-react-native-app阅读自述文件
使用expo init 命令选择模板后,出现此错误
Cannot find module 'minizlib'
Error: Cannot find module 'minizlib'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/expo-cli/node_modules/pacote/node_modules/tar/lib/pack.js:28:14)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/expo-cli/node_modules/pacote/node_modules/tar/lib/create.js:6:14)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
我已经尝试了这些线程上的所有内容:
Expo commands throwing "Error: Cannot find module 'minizlib'"
所以我已经卸载/安装了 Nodejs,尝试用 brew 安装它,并尝试安装 minizlib,它并没有改变任何东西。
Nodejs 版本:v10.16.3
操作系统:流行!_OS 18.04 LTS
如果有人可以帮忙,谢谢
【问题讨论】:
标签: javascript react-native npm expo