3

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 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 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 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 ]

4

3 回答 3

2

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

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

brew install yarn

然后使用:

yarn global add expo-cli

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

expo init nameOfTheNewProject

并在控制台中选择一个模板。最后运行项目

yarn start

请让我知道这对你有没有用!

于 2019-03-13T11:01:08.457 回答
1

1.运行“npm update -g”更新所有npm全局包。

2.运行“yarn add global expo-cli”

3.uninstall exop cli > clean npm cache folder, .expo folder install install again

于 2019-01-01T05:04:14.970 回答
1

在此路径中删除这些文件 ['expo.ps1' , 'expo-cli.ps1']:

'C:\Users{用户名}\AppData\Roaming\npm'

然后运行:

npm i -g expo-cli

于 2020-01-17T15:46:37.887 回答