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
重新做完教程后,一切都很棒。
答案 0 :(得分:1)
许多软件包仍然不支持节点v6。考虑回到第5版。