繁体   English   中英

浏览器不支持Node tls模块

[英]Node tls module not supported in browsers

我使用jspm和SystemJS在npm中加载了一些节点模块。 其中一个( docker-api-wrapper )在其中使用了请求模块。 因此,当我尝试在浏览器上运行它时,总是会抛出一个异常,例如

 Error loading "npm:docker-api-wrapper@0.2.9" at http: //localhost:58063/lib/npm/docker-api-wrapper@0.2.9.js Error loading "npm:docker-api-wrapper@0.2.9" from "js/site" at http: //localhost:58063/js/site.js Error evaluating http: //localhost:58063/lib/npm/docker-api-wrapper@0.2.9.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/docker-api-wrapper@0.2.9/index.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/docker-api-wrapper@0.2.9/lib/DockerApi.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/docker-api-wrapper@0.2.9/lib/utils.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/request@2.61.0.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/request@2.61.0/index.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/request@2.61.0/request.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/forever-agent@0.6.1.js uncaught exception: Error evaluating http: //localhost:58063/lib/npm/forever-agent@0.6.1/index.js uncaught exception: Error evaluating http: //localhost:58063/lib/github/jspm/nodelibs-tls@0.1.0.js uncaught exception: Error evaluating http: //localhost:58063/lib/github/jspm/nodelibs-tls@0.1.0/index.js uncaught exception: Node tls module not supported in browsers. es6 - mod...ader.js(line 7) uncaught exception: Node tls module not supported in browsers. uncaught exception: Error evaluating http: //localhost:58063/lib/github/jspm/nodelibs-tls@0.1.0/index.js uncaught exception: Node tls module not supported in browsers. 

有人可以帮我吗? 非常感谢你。

我看到您已经在请求问题跟踪器上发布了此消息 我认为它可能实际上不受支持。 尝试then-request

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM