You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
复现此问题的仓库,点击这里,使用npm安装则一切正常,而使用cnpm安装了依赖,虽然安装过程一切正常,但是使用下面这个命令编译:
则报下面这个错误:
经过初步分析后,原因大致如下:
在node_modules目录下,我发现有大量的下划线开头的包:
然后,cnpm通过创建与npm同名的软连接,并让他们指向这些下划线开头的包,达到模拟npm安装效果的目的:
这个方式对于普通的库,没有问题,但是对于angular这样定义了全局标识符的库,则会导致在编译时,报出最上面那个截图上的错误:
其中,
ngDevMode
就是一个全局标识符,由于存在两份(一个是软链,一个是下划线开头的包),因此出错。The text was updated successfully, but these errors were encountered: