node.js - 安装 Angular 的问题
问题描述
我在全局安装 Angular 时遇到问题。我在下面包含了错误。
C:\Users\DevSa\ng -> C:\Users\DevSa\node_modules\@angular\cli\bin\ng
> @angular/cli@8.3.19 postinstall C:\Users\DevSa\node_modules\@angular\cli
> node ./bin/postinstall/script.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @angular/cli@8.3.19 postinstall: `node ./bin/postinstall/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @angular/cli@8.3.19 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DevSa\AppData\Roaming\npm-cache\_logs\2019-11-26T21_34_00_712Z-debug.log
解决方案
C:\Program Files\nodejs\
在环境变量 PATH 列表的顶部添加,然后C:\Users\{your username}\AppData\Roaming\npm
在其下方添加。
希望能解决你的问题。
推荐阅读
- ruby-on-rails - Rails 4.2:如何禁用 cookie 加密
- max - PowerPivot DAX 两个值的最大值
- javascript - 在 Firefox 中处理 keydown 失败
- python - 运行脚本以在终端中调用命令
- jquery - 目标嵌套在表内的 td
- clojure - 使用clojure开发游戏服务器
- image-processing - 使用圆形物体从图像中去除噪声
- snakemake - snakemake 配置路径环境
- php - 如何使用 php $_SERVER['PHP_SELF'] 将表单数据插入 Mysql 数据库并自动打印相同的表单数据
- python - 将信息存储在文件中,Python