NPM链接 - 应用程序无法找到链接的库依赖性[Angular]
我正在开发一个应用程序和用于所述应用程序的库。但是,我需要更新库,但是,当我使用NPM链接时,应用程序说我导入的库不需要所需的依赖项。这是一个已部署的库,当不使用NPM链接并使用已部署的版本时确实有效。我是否缺少额外的步骤将依赖项包括在链接过程中,还是我需要运行额外的命令?
任何建议都将不胜感激
I am developing an application and a library used in said application. I need to update the library, however, when I use NPM link the application says that the library I have imported does not have the dependencies required. This is a deployed library and does work when not using NPM link and instead using the deployed version. Is there an extra step I am missing to include the dependencies in the link process, or is there an extra command I need to run?
Any suggestions would be much appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经解决了这个问题。我解决的方式是通过在
angular.json
文件中添加“ PreservesyMlinks”:True
。布局应该是:
请注意,这只是对Angular 11或更少版本的解决方案
。内角“>答案为大于11的版本提供了解决方案
I have fixed this issue. The way I resolved it was by adding
"preserveSymlinks": true
in theangular.json
file.The layout should be:
Please note, this is only a solution for versions of angular 11 or less
This answer offers a solution for versions greater than 11