我正在尝试使用常用方法将本地项目testabc123
链接到myproject
:
cd testabc123
npm link
cd ../myproject
npm link testabc123
然而,我收到了错误消息:
npm ERR! code E404
npm ERR! 404 Not Found - GET http://registry.npmjs.org/testabc123 - Not found
npm ERR! 404
npm ERR! 404 'testabc123@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
有什么想法吗?我将当地项目联系起来的方法似乎很常见,大多数人都能成功地做到这一点。
文件夹结构
some-folder
--testabc123
--myproject
转到myproject并执行npm link ../testabc123
,您可能需要管理员访问权限才能执行此操作。