【问题标题】:How to install Angular CLI manually without using npm install如何在不使用 npm install 的情况下手动安装 Angular CLI
【发布时间】:2019-10-01 22:15:42
【问题描述】:

由于我的公司有一些代理阻止从外部网站下载,我无法使用npm install 下载 Angular cli。

我在企业代理服务器后面找到了一些资源来执行此操作,但它需要我无权访问的管理员。

有什么方法可以下载包并手动安装吗?

谢谢。

我找到了 Angular Cli github page

我希望在本地环境中使用 Angular Cli。

【问题讨论】:

  • 除非您想花费整个 来逐个查找、下载和手动安装每个依赖项。您将需要配置公司代理、更新防火墙规则或找到新工作。
  • 您应该能够将文件复制到 node_modules 中。据我回忆,Angular 包没有或几乎没有依赖项。
  • 说服他们或离开
  • 您遇到的错误是什么?你怎么确定你的代理服务器不让你做 npm install ?
  • 您必须配置一些代理设置,check this article this will guide you how to set up proxy in a corporate environment,特别是第 4 步和第 5 步 ..希望这有帮助!

标签: node.js angular eclipse npm angular-cli


【解决方案1】:

您可以配置 npm 以使用您公司的代理

npm config set http-proxy http://<username>:<password>@[proxy-server-host-name]:[Port]
npm config set https-proxy https://<username>:<password>@[proxy-server-host-name]:[Port]

例如

npm config set http-proxy http://testuser:testpassword@proxy.testserver.com:9091
npm config set https-proxy https://testuser:testpassword@proxy.testserver.com:9091

【讨论】:

    猜你喜欢
    • 2018-07-30
    • 2019-03-30
    • 2018-05-10
    • 2018-09-08
    • 2019-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-19
    相关资源
    最近更新 更多