[英]Angular 11 css is not working when node_modules folder is symlinked
I am working on several Angular projects which has same node_folder (with same node dependencies), so i made a symlink to new second angular project, it compiles successfully, but CSS is not working.我正在处理几个 Angular 项目,这些项目具有相同的 node_folder(具有相同的节点依赖项),所以我创建了一个指向新的第二个 angular 项目的符号链接,它编译成功,但 Z2C56C360580420D58DF172FEDZ2 不工作。
later i removed the symlink and modified the angular.json with "../node_modules/.." pointing to node_modules folder which is on same level as project folder后来我删除了符号链接并修改了 angular.json 与“../node_modules/..”指向与项目文件夹处于同一级别的node_modules文件夹
etc ETC
still the project gets compiled, yet CSS is not working - is it possible to fix this and get CSS working with this way?项目仍在编译,但 CSS 无法正常工作 - 是否可以解决此问题并让 CSS 以这种方式工作?
Adding NODE_PATH pointing to node_modules folder and modifying the angular.json accordingly solved the problem添加指向 node_modules 文件夹的 NODE_PATH 并相应地修改 angular.json 解决了问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.