无法npm链接本地依赖项

u7up0aaq  于 2021-09-13  发布在  Java
关注(0)|答案(1)|浏览(267)

我想把当地的项目联系起来 test123myproject 使用通常的方法:

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!)

有什么想法吗?我连接本地项目的方法似乎很普遍,大多数人都能成功地做到这一点。

nnt7mjpx

nnt7mjpx1#

文件夹结构

some-folder
--testabc123
--myproject

转到我的项目,然后就这样做 npm link ../test123 您可能需要管理员权限才能执行此操作。

相关问题