我使用的是ubuntu 16操作系统,我的node和npm版本如下
节点v7.4.0
npm 4.0.5
如果我给 ng 新的我的项目,我会遇到以下错误
It seems like you're using a project generated using an old version of the Angular CLI. The latest CLI now uses webpack and has a lot of improvements including a simpler workflow, a faster build, and smaller bundles.
To get more info, including a step-by-step guide to upgrade the CLI, follow this link: https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14
请帮我解决这个问题
最佳答案
执行以下步骤:
通过执行以下命令卸载
anguar-cli
并清理 npm 缓存:npm uninstall -g angular-cli
npm 缓存清理
删除文件夹 /usr/local/lib/node_modules/angular-cli (或文件夹 angular-cli 来自您的全局
npm_modules
文件夹)。使用
npm install -g angular-cli@latest
重新安装 angular-cli,然后尝试 创建新项目。
关于angular - 安装 Angular-cli 后,在 ng -v 上出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41888605/