我有一个我维护的npm包.某些东西 – 也许是npm本身 – 正在向package.json添加条目.它们以下划线字符开头:
"_args": [
[
{
"raw": "some-cool-package@https://registry.npmjs.org/some-cool-package/-/some-cool-package-2.2.0.tgz","scope": null,"escapedName": "some-cool-package","name": "some-cool-package","rawSpec": "https://registry.npmjs.org/some-cool-package/-/some-cool-package-2.2.0.tgz","spec": "https://registry.npmjs.org/some-cool-package/-/some-cool-package-2.2.0.tgz","type": "remote"
},"C:\\Users\\mike\\Documents\\mycompany"
]
],"_from": "some-cool-package@>=2.2.0 <3.0.0","_id": "some-cool-package@2.2.0","_inCache": true,"_location": "/some-cool-package","_phantomChildren": {},"_requested": {
"raw": "some-cool-package@https://registry.npmjs.org/some-cool-package/-/some-cool-package-2.2.0.tgz","type": "remote"
},"_requiredBy": [
"/"
],"_resolved": "https://registry.npmjs.org/some-cool-package/-/some-cool-package-2.2.0.tgz","_shasum": "f0d5d982c15d63f653e48fff552400eb241b7407","_shrinkwrap": null,"_spec": "some-cool-package@https://registry.npmjs.org/some-cool-package/-/some-cool-package-2.2.0.tgz","_where": "C:\\Users\\mike\\Documents\\mycompany",
什么是添加这些条目?
最佳答案
我认为你是对的,它是NPM itself将绝对URL放入package.json文件中.
看来你不是唯一一个遇到这个问题的人,并且似乎没有计划解决这个问题(问题于2015年12月15日关闭),不幸的是.
虽然一位评论者建议使用removeNPMAbsolutePaths程序包来解决此问题.