集合"@ schematics/angular"无法解决 [英] Collection "@schematics/angular" cannot be resolved

查看:347
本文介绍了集合"@ schematics/angular"无法解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在ubuntu中安装了angular cli,但是当我尝试通过以下方式创建新应用时: ng new my-dream-app它显示错误消息,提示Collection "@schematics/angular" cannot be resolved. Error: Collection "@schematics/angular" cannot be resolved.我由npm install @schematics/angular安装了 @ schematics/angular ,但没有用.我卸载了角度cli,然后再次重新安装了它,但是它没有起作用,它抛出了同样的错误.

I just installed angular cli in my ubuntu, but when I try to create new app by ng new my-dream-app It shows error saying Collection "@schematics/angular" cannot be resolved. Error: Collection "@schematics/angular" cannot be resolved. I installed @schematics/angular by npm install @schematics/angular but it didnt work. I uninstalled angular cli and again reinstalled it but it didnt work, it throws same error.

推荐答案

如果使用-g键安装angular-cli,应该没问题.如果没有,请尝试全局安装angular-cli. 然后,您可以检查依赖关系.在您的node_modules中找到@angular文件夹.在/cli/node_modules内部,您应该看到@schematics文件夹.如果存在,一切都会很好.

If you installed angular-cli with -g key, it should be fine. If not, try installing angular-cli globally. Then you could check dependencies. In your node_modules find @angular folder. There inside /cli/node_modules you should see @schematics folder. If it exists, everything should be fine.

这篇关于集合"@ schematics/angular"无法解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆