【问题标题】:I wanna reinstall expo-cli, but there is err. And can't uninstall expo-cli我想安装expo-cli,但是有错误。并且无法卸载expo-cli
【发布时间】:2020-01-28 09:29:27
【问题描述】:

我尝试通过 expo 构建应用但失败了,我尝试重新安装 expo-cli。 所以,我输入了下面的代码来删除 expo-cli。

npm -g uninstall expo-cli --save

(base) Bongui-MacBookPro:expo-firebase-master bong$ npm uninstall expo-cli -g
up to date in 0.042s

但是,如果我输入 expo,它将运行。

所以如果你再次忽略它并尝试重新安装 expo-cli, 出现以下错误:

npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /Users/bong/npm-global/bin/expo-cli
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/Users/bong/npm-global/bin/expo-cli'
npm ERR! File exists: /Users/bong/npm-global/bin/expo-cli
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bong/.npm/_logs/2020-01-28T09_18_38_604Z-debug.log

谢谢各位老师。 请帮我解决问题。 谢谢。

【问题讨论】:

    标签: ios react-native expo


    【解决方案1】:

    我认为您可能希望在构建时覆盖当前文件夹。 尝试在您的命令中使用--force 扩展名,这将解决问题。我想是这样的:npm install -g --force expo-cli

    我希望这会有所帮助。

    【讨论】:

      【解决方案2】:

      我用的是linux,我试过Ubuntu

      sudo npm install -g --force expo-cli
      

      它对我有用。

      【讨论】:

        猜你喜欢
        • 2019-05-16
        • 2023-03-08
        • 2020-07-09
        • 2021-11-12
        • 2021-08-10
        • 1970-01-01
        • 2022-12-01
        • 1970-01-01
        相关资源
        最近更新 更多