【发布时间】:2016-07-12 09:00:06
【问题描述】:
我同时处理两个存储库。一个依赖于另一个(在package.json 依赖项中列出)。
所以我在other 中使用npm link ..\theOne 来同时处理两个模块。结果,我可以在另一个模块上测试修改。问题是在此 other 模块上执行 npm shrinkwrap 时:它会产生如下错误:
npm ERR! extraneous C:\other\node_modules\theOne\node_modules\{xxxx}
{xxxx} 是一个开发依赖项,对于 npm 来说似乎是无关的。
有人成功地用符号链接将一个模块收缩包装到另一个模块吗?
注意:
- npm 3.10.3
- 节点 6.3.0
【问题讨论】:
-
对我来说,shrinkwrap 本身确实有效,但是随后对
npm link theOne && npm install的任何尝试都失败了,说“未找到:theOne” -
你试过
npm link ../theOne吗?我的意思是,使用相对路径? -
其实我的问题是由于打字稿。修复后它工作正常,是的 npm shrinkwrap 也工作正常。也许在 plunker 中分享您的代码?
标签: node.js npm symlink shrinkwrap npm-shrinkwrap