【发布时间】:2016-11-09 20:08:24
【问题描述】:
更新:
好的,它 seccussfully 安装了“npm install -g angular-cli”,但现在出现新错误:“您不能在 angular-cli 项目中使用新命令。”同时尝试做:“ng new ang2pro”用于制作新项目。
C:\Users\armyTik\Desktop\angular2_projects\1>ng new pro-name
(node:6512) fs: re-evaluating native module sources is not supported. If you are using
the graceful-fs module, please update it to a more recent version.
You cannot use the new command inside an angular-cli project.
原帖:
昨天运行良好,现在重新安装 nodejs 后出现以下错误:
【问题讨论】:
-
仅在安装
angular-cli包或所有包时才会出现此错误。它清楚地表明您的global目录路径存在问题。 -
我做的唯一步骤是创建一个空文件夹并在“npm install -g angular-cli”中运行。
-
你能尝试安装其他软件包吗?喜欢
npm install -g jquery -
你也不必去空目录来运行这个命令。你可以在任何地方运行它。它只是在配置的
global路径中安装包。默认为 `C:\AppData\Roaming\npm\node_modules`
标签: node.js angular npm angular2-cli