我无法安装 expo-cli [英] I can't install expo-cli

查看:36
本文介绍了我无法安装 expo-cli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 npm i -g expo-cli 安装 expo-cli 时,我得到了数千个 npm WARN tar invalid entry,然后我收到此错误:

When I install expo-cli with npm i -g expo-cli I get thousands of npm WARN tar invalid entry, and then I get this error :

npm 错误!小路C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\bunyan\bin\bunyannpm 错误!代码 ENOENT npm ERR!错误号 -4058 npm 错误号!系统调用 chmod npm呃!enoent ENOENT: 没有那个文件或目录,chmod'C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\bunyan\bin\bunyan'npm 错误!enoent 这与 npm 无法找到文件有关.npm 错误!恩恩

npm ERR! path C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\bunyan\bin\bunyan npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\bunyan\bin\bunyan' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!
C:\Users\mrkinix\AppData\Roaming\npm-cache_logs\2018-12-15T14_11_31_669Z-debug.log

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\mrkinix\AppData\Roaming\npm-cache_logs\2018-12-15T14_11_31_669Z-debug.log

35648 错误路径 C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\dev-tools\node_modules\lodash35649 错误代码 ENOENT 35650 错误 errno -4058 35651 错误系统调用重命名 35652 错误 enoent ENOENT:没有这样的文件或目录,重命名'C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\dev-tools\node_modules\lodash'->'C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\dev-tools\node_modules.lodash.DELETE'35653 错误 enoent 这与 npm 无法找到文件有关.35654 详细退出 [ -4058, true ]

35648 error path C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\dev-tools\node_modules\lodash 35649 error code ENOENT 35650 error errno -4058 35651 error syscall rename 35652 error enoent ENOENT: no such file or directory, rename 'C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\dev-tools\node_modules\lodash' -> 'C:\Users\mrkinix\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\dev-tools\node_modules.lodash.DELETE' 35653 error enoent This is related to npm not being able to find a file. 35654 verbose exit [ -4058, true ]

推荐答案

我在使用 npm install -g expo-cli 时遇到了同样的问题,有MODULE_NOT_FOUND",

I was having the same problem with npm install -g expo-cli, having "MODULE_NOT_FOUND",

我用 brew 安装了 yarm,以防万一你还没有它:

I installed yarm with brew, just in case you do not already have it:

brew install yarn

然后使用:

yarn global add expo-cli

要创建一个项目,您可以:

to create a project you can:

expo init nameOfTheNewProject

并在控制台中选择一个模板.最后用

and choose a template in the console. Finally run the project with

yarn start

告诉我它是否适合您!

这篇关于我无法安装 expo-cli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆