使用 Visual Studio 2015 在防火墙后面使用 npm

2024-05-27

我尝试利用 Visual Studio 2015 中新的 npm 支持,但遇到了一些问题。我位于公司防火墙后面。

我尝试从 package.json 文件中添加“grunt”,并且可以看到与 npm 相关的输出。

npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-bower-task
npm http GET https://registry.npmjs.org/grunt-contrib-cssmin
npm http GET https://registry.npmjs.org/grunt-bower-task
npm http GET https://registry.npmjs.org/grunt-contrib-cssmin
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/grunt-bower-task
npm http GET https://registry.npmjs.org/grunt-contrib-cssmin
npm ERR! Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR!     at SecurePair.<anonymous> (tls.js:1367:32)
npm ERR!     at SecurePair.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:979:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:471:13)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:340:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:368:25)
npm ERR!     at doWrite (_stream_writable.js:225:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:215:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:182:11)
npm ERR!     at write (_stream_readable.js:601:24)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Data\Develop\Playground\WebBasics2
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm

我看过一些帖子,您可以将节点配置为忽略 SSL,但不知道如何在 Visual Studio 2015 中执行此操作。

请帮忙 此致, 托马斯


以下步骤适用于 VS 2015

1-运行命令提示符行政人员

2- 前往Path of External tools对于你的情况,VS 2015 是“ C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Editors

3- npm 配置集 ca=""

4- npm 配置设置 strict-ssl false

5- npm 安装 npm -g --ca=null

For Visual Studio 2017 专业版请查看 Jignesh Hirpara 的评论

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 Visual Studio 2015 在防火墙后面使用 npm 的相关文章

随机推荐

  • 如何在 django 中保存文件而不创建模型

    我想上传 excel 文件并将该文件保存到 django 中的特定位置 而不为该文件创建模型 我在这里尝试过 我的 forms py 文件 class UploadFileForm forms Form file forms FileFie
  • 如何在node.js子进程模块中将消息以及标准输出从子进程传递到父进程?

    我的子进程模块有问题 特别是 child spawn 和 child fork 我依赖 child process fork 的文档 其中表示 这是 child process spawn 功能的一个特例 生成 Node js 进程 除了将
  • UISearchBar 在单击时修改其框架/边界

    我正在尝试将 UISearchController 放置在我的应用程序 UI 中 布局是 黄色 ViewController 红色 另一个 ViewController 黑色 YellowViewController 中的容器 我想将 UI
  • Android:已购买应用程序的订单 ID

    我们计划从付费应用程序转变为带有应用程序内购买功能的免费应用程序 我们需要让任何支付应用程序费用的用户免费获得应用程序内购买 我正在考虑以下解决方案 我们将在我们的服务器内存储用户的唯一 ID 或唯一订单 ID 当我们发布新的免费版本的应用
  • 通过单击按钮更改 PHP include ("link.php")

    如何通过单击按钮更改 PHP include link html BUTTON 1 change to BUTTON 2 change to BUTTON 3 change to 如何在不刷新页面的情况下执行此操作 使用ajax Wrap
  • 关闭特定url上的AngularJS窗口

    我是 angularjs 的新手 所以这个问题对于经验者来说可能看起来很愚蠢 但我真的无法执行此操作 任何人都可以告诉我如何在到达特定网址后从 webview 返回到应用程序 就像我正在打开一个浏览器中的窗口用于支付过程 所以我需要的是 当
  • Rstudio 更有意义的窗口标题

    我在 Ubuntu 16 04 下使用 R studio 版本 1 0 143 窗口标题仅显示一个非常无信息的 RStudio 我希望至少有当前选项卡的名称 或者最好是与此选项卡对应的文件的完整路径 在 Windows 下 完整路径似乎出现
  • 安装失败,消息为 null - Genymotion 错误

    我是 Android 编程新手 仍在学习基础知识 我已经安装了 Android Studio 和 Genymotion 如提供的教程中所述 当我使用捆绑的模拟器运行 Android 应用程序时 一切工作正常 但是 使用 Genymotion
  • 如何在 devserver 上使用 Oauth 测试 Cloud Endpoints

    我的应用程序使用 Oauthed Cloud Endpoints 并且在生产中运行良好 我的问题是 在本地开发服务器上 我的 User 用户始终设置为 电子邮件受保护 cdn cgi l email protection 即使我已经完成了通
  • 使用 offsets_for_times 从时间戳消费

    尝试使用 confluence kafka AvroConsumer 来消费给定时间戳的消息 if flag creating a list topic partitons to search list map lambda p Topic
  • DOS批处理命令一次处理1个文件

    我正在尝试执行一项特定任务 其中需要从可能包含未定义数量的文件的文件夹中读取文件 一次一个 我需要能够将文件夹中的第一个文件移动到新位置 然后使用另一个批处理文件执行另一个任务 主要目的是一次读取一个文件 而不是执行将读取所有文件的 立刻
  • 字符串被两个不同的分隔符分割

    我有这样的字符串 some dasd dasd dasdas dasdas dasd das dsad 我需要用两个不同的符号将字符串拆分为数组 and 所以我想得到数组 some dasd dasd dasdas dasdas dasd
  • 就绪探测失败:超时:1秒内无法连接服务“:8080”

    我正在尝试使用 minikube 构建微服务映像并将其部署到在我的开发计算机上运行的单节点 Kubernetes 集群 我正在使用 Google 的云原生微服务演示应用程序 Online Boutique 来了解 Kubernetes Is
  • VS Code 多行搜索和替换 HTML / XML 标签? [复制]

    这个问题在这里已经有答案了 如何搜索可能包含多个非空行的开始和结束标记
  • “forms.ContactForm 对象”没有属性“hidden_​​tag”

    我正在尝试使用 Flask 创建联系表单 但在渲染页面时不断收到此错误 forms ContactForm object has no attribute hidden tag 这是我的文件 联系方式 html extends layout
  • 猫鼬查找并删除

    我正在尝试删除满足查询的多个文档 但是 我需要这些文档的数据将它们存储在单独的集合中以实现撤消功能 我让它工作的唯一方法是使用多个查询 Data find query exec function err data Data remove q
  • 在 List ForEach() 中设置多个属性?

    给定一个类 class foo public string a public int b 0 然后是它们的通用列表 var list new List
  • 自动调整所有列的大小以适合内容

    我所有的搜索结果都是sizeColumnsToFit and autoSizeColumns这不是我想要的 我的网格有很多列 所以它水平滚动 这很好 但我无法提前知道一列中最宽的文本所需的最大空间是多少 因此希望网格自动调整所有列的大小以适
  • 在非 Angular 类中获取注入的依赖项

    我有当前的 和简化的 课程 export class NavigationItem constructor private router Router navigateTo this router navigate this id 我不想每
  • 使用 Visual Studio 2015 在防火墙后面使用 npm

    我尝试利用 Visual Studio 2015 中新的 npm 支持 但遇到了一些问题 我位于公司防火墙后面 我尝试从 package json 文件中添加 grunt 并且可以看到与 npm 相关的输出 npm http GET htt