npm-shrinkwrap.json:无法从“node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view"安装 [英] npm-shrinkwrap.json: Could not install from "node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view

查看:64
本文介绍了npm-shrinkwrap.json:无法从“node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view"安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上我尝试使用 "react-navigation": "1.5.11", 在 React Native 0.53.3 项目上运行 npm install 并且我得到了这个错误:

I tried to run an npm install this morning on a React Native 0.53.3 project with "react-navigation": "1.5.11", and I got this error:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb" as it does not contain a package.json file.

我认为通过将它添加到我的 package.json 文件中可以解决:

I thought it would resolve by adding this to my package.json file:

"react-native-tab-view": "^1.3.2",

但我继续遇到同样的错误.我向 react-navigation 团队提出了几个问题,但他们认为这是 npm 的问题,因此关闭了.

but I continue to get that same error. I opened a couple of issues with react-navigation team and it got closed as they concluded it is a problem with npm.

有人遇到过这个问题吗?我该如何解决这个问题,因为它使我无法运行 npm install 并使项目启动并运行.

Has anyone run into this issue? How can I resolve this as its keeping me from running npm install and getting the project up and running.

看起来它在 npm-shrinkwrap.json 中引用了这个:

It looks like it is referencing this inside of npm-shrinkwrap.json:

"react-native-tab-view": {
      "version": "github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb",
      "from": "react-native-tab-view@github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb",
      "requires": {
        "prop-types": "^15.6.0"
      }
    },

推荐答案

这似乎是 npm-shrinkwrap.json 的一个问题,其中错误不断引用其中的以下内容:

This seems to be an issue with npm-shrinkwrap.json where the error kept referencing the following inside of it:

"react-native-tab-view": {
      "version": "github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb",
      "from": "react-native-tab-view@github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb",
      "requires": {
        "prop-types": "^15.6.0"
      }
    },

只删除这个并没有帮助,我不得不完全删除 npm-shrinkwrap.json 并使用传统的 package-lock 执行 npm install.json.

Removing just this did not help, I had to completely remove npm-shrinkwrap.json and do an npm install with just the conventional package-lock.json.

这篇关于npm-shrinkwrap.json:无法从“node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view"安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆