I can't install expo-cli

拟墨画扇 提交于 2019-12-21 06:06:54

问题


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 ]


回答1:


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

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

brew install yarn

and then use:

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

Let me know if it works for you!




回答2:


1.run "npm update -g" update all npm global packages.

2.run "yarn add global expo-cli"

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



来源:https://stackoverflow.com/questions/53794015/i-cant-install-expo-cli

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