我无法安装expo-cli

时间:2018-12-15 14:15:17

标签: react-native npm vue-native

当我将expo-clinpm i -g expo-cli一起安装时,我得到成千上万的{{​​1}},然后出现此错误:

  

npm错误!路径   C:\ Users \ mrkinix \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules @ expo \ bunyan \ bin \ bunyan   npm ERR!代码ENOENT npm ERR! errno -4058 npm错误!系统调用chmod npm   呃! enoent ENOENT:没有这样的文件或目录,chmod   'C:\ Users \ mrkinix \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules @ expo \ bunyan \ bin \ Bunyan'   npm ERR! enoent这与npm无法找到文件有关。   npm ERR!先天

     

npm错误!有关此运行的完整日志,请参见: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 \ lodash   35649错误代码ENOENT 35650错误errno -4058 35651错误syscall重命名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,是]

3 个答案:

答案 0 :(得分:0)

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

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

3.uninstall exop cli>清除npm缓存文件夹,.expo文件夹再次安装安装

答案 1 :(得分:0)

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

我为yarm安装了brew,以防万一您没有它:

from sklearn.metrics import confusion_matrix
Y_pred = classifier.predict_generator(test_set,validation_steps//batch_size+1)


y_pred = np.argmax(Y_pred, axis=1)
print('Confusion Matrix')
print(confusion_matrix(test_set.classes, y_pred))

然后使用:

brew install yarn

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

yarn global add expo-cli

,然后在控制台中选择一个模板。 最后使用

运行项目
expo init nameOfTheNewProject

让我知道它是否对您有用!

答案 2 :(得分:0)

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

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

然后运行:

npm i -g expo-cli