【问题标题】:Getting "Cannot read property 'pickAlgorithm' of null" error in react native在本机反应中出现“无法读取属性'pickAlgorithm' of null”错误
【发布时间】:2021-12-02 15:14:11
【问题描述】:

运行npm install 时出现错误。 错误是:

npm ERR! Cannot read property 'pickAlgorithm' of null

npm ERR! A complete log of this run can be found in:
npm ERR!    npm-cache\_logs\2021-10-14T08_03_47_266Z-debug.log

我做了以下,但错误仍然存​​在:

  1. 已删除node-modules
  2. 已删除给定文件
  3. 正在运行npm cache clear --force

环境:

操作系统:Windows 10
反应原生:0.65.1
节点:14.17.4
npm: 7.21.0

【问题讨论】:

    标签: react-native npm npm-install


    【解决方案1】:

    请使用以下:

    npm cache clear --force
    
    npm install
    

    在我的情况下它正在工作

    【讨论】:

      【解决方案2】:

      如果您使用的是 Windows 操作系统,请关闭 VS Code,然后以管理员身份打开命令提示符并运行 npm cache verifynpm install

      对我有用

      【讨论】:

        【解决方案3】:

        唯一对我有帮助的是清除缓存:

        npm cache clear --force
        

        【讨论】:

        • 解决方案对我有用,谢谢
        【解决方案4】:

        升级到 npm v7.23.0 然后npm install 并且工作正常。

        【讨论】:

        • 我升级到 npm v8.1.2 仍然遇到同样的错误。你能提供你的帮助吗
        • @Joca 我今天升级到 npm v8.1.2 后才得到这个。我尝试使用npm install -g npm@7.24.2 降级回 npm 7,这对我有用
        • 哦,谢谢。我做了 npm cache clean 让它为我工作。
        猜你喜欢
        • 2022-09-28
        • 1970-01-01
        • 2015-03-20
        • 1970-01-01
        • 2021-09-25
        • 1970-01-01
        • 2023-03-04
        • 2022-06-18
        • 1970-01-01
        相关资源
        最近更新 更多