node.js - 使用链接包的项目上的 npm 过时/更新失败
问题描述
我遇到了在使用链接包的项目上运行npm outdated
/失败的情况:npm update
$ npm outdated
npm ERR! code ETARGET
npm ERR! notarget No matching version found for my-library@^2.0.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/myuser/.npm/_logs/2021-09-26T06_18_14_326Z-debug.log
这是链接的输出:
$ npm link my-library
/home/myuser/path/to/project/node_modules/my-library -> /home/myuser/path/to/node/node-v14.15.1-linux-x64/lib/node_modules/my-library -> /home/myuser/path/to/library/my-library
我清除了 npm 的缓存(强制)。删除了我的package-lock.json
和node_modules
。首先链接,然后npm install
是其他依赖项。
没有任何方法可以解决这个问题。
$ npm -v
6.14.15
$ node -v
v14.15.1
解决方案
推荐阅读
- java - 高于 Integer.MAX_VALUE 的映射条目
- perl - 在 OpenSSH 中重定向调试输出
- python - 将 Spark Scala 连接语句转换为 Python
- c# - 裁剪图像的一部分
- c# - 如何在TextBoxes中获取所选行的dataGridView的所有列值
- javascript - (反应)侦听由作为道具传播的更改数据列表触发的下拉/选择值更改
- java - 根据单元格值更改单元格背景颜色
- xamarin - Xamarin 表单:IOS 不会加载 webview
- node.js - NodeJS ReactJS 部署的应用程序返回 404
- python - Tensorflow:ImportError:libcudnn.so.7:无法打开共享对象文件:没有这样的文件或目录