繁体   English   中英

ng serve在Windows10上不起作用(angular-cli,节点6.3.0)

[英]ng serve doesn't work on Windows10 (angular-cli, node 6.3.0)

遵循https://cli.angular.io/上最简单的教程

ng new my-app
cd my-app
ng serve

我收到以下错误

(node:5888) 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 have to be inside an angular-cli project in order to use the serve command.

消息“ 您必须在angular-cli项目中才能使用serve命令。 ”消息用红色表示,因此这不是警告

Node,npm和graceful-fs是当前的最新版本。

>ng version
(node:7288) 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.
angular-cli: 1.0.0-beta.9
node: 6.3.0
os: win32 x64

除了在Mac / Linux上执行此操作外,还有其他想法吗?

更新:解决方案是安装NVM并安装node.js版本5.12.0(或任何5.x)

nvm install 5.12.0
nvm use 5.12.0
npm install -g angular-cli
npm install -g typescript

重新做完教程后,一切都很好。

许多软件包仍不支持节点v6。 考虑回到v5。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM