node.js - 安装 angular/cli 时出错 - 未找到 : python2

标签 node.js npm angular-cli

我正在尝试使用此命令“npm install -g @angular/cli”进行安装。

但我总是收到错误“错误:未找到:python2”

我在这里遗漏了什么吗?

最佳答案

以防万一您不想降级,反正也不需要降级。 那么这就是你应该做的,

  1. 首先修复node-sass版本问题: 问题在于 node-sass 的版本(在 python2 错误之前)。所以安装它作为 npm 安装 node-sass

  2. 现在运行 npm install

  3. 如果它要求使用 npm audit fix 进行修复。继续!

关于node.js - 安装 angular/cli 时出错 - 未找到 : python2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43605200/

相关文章:

angular - 使用 angular-cli-ghpages 将 Angular4 部署到 ghpages 时出错

angular - 如何删除 Angular 6 中的 dist 文件?

node.js - 带有html的Ejs引擎无法正常工作

node.js - 使用 jasmine 测试 Express.js

node.js - 使用 Homebrew 程序安装新 Node 后执行 "npm -g update"时出错

node.js - 安装 Angular Material 导致近 600 个漏洞审核结果

github - 如何修复 401 Unauthorized Private Github Package

Angular 2 AoT ngc 不生成任何文件

node.js - 我想在 mongodb 中增加许多文档

node.js - 没有 sudo 无法使用 NPM