简体   繁体   English

是否可以在没有npm或节点的情况下在最终用户的计算机上更新模块?

[英]Can I update a module on end user's machine without npm or node?

I'm developing an electron application and a module and an electron application uses a module that I made. 我正在开发电子应用程序和模块,而电子应用程序使用我制作的模块。 but I really want to update a module on end user's machine when the target module has new version even if their machine hasn't installed NPM or node environment. 但我真的想在目标用户使用新版本的目标用户的计算机上更新模块,即使他们的计算机尚未安装 NPM或节点环境。

In conclusion, my question is: Can I update a module for an electron application on end user's machine even if NPM or Node environment hasn't installed on their computer? 总之,我的问题是:即使在计算机上安装 NPM或Node环境, 可以在最终用户的计算机上为电子应用程序更新模块吗?

Update: The module that I want to update is node.js addon and the binary is published and installed on end user's machine by node-pre-gyp, I can't use any of CDN because it's addon. 更新:我要更新的模块是node.js插件 ,二进制文件通过node-pre-gyp发布并安装在最终用户的计算机上,我不能使用任何CDN,因为它是插件。

Here's a quick solution : you can keep the module file (.js minified/uglified) in a remote cdn and then access that file at client's end. 这是一个快速的解决方案:您可以将模块文件(最小化/最小化.js)保存在远程CDN中,然后在客户端访问该文件。 Whenever you want to update , you can just replace the file. 每当您想要更新时,都可以替换文件。

暂无
暂无

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

相关问题 如何在不安装节点的情况下在 django-admin 小部件中使用 npm 中的模块? - How can I use a module from npm in a django-admin widget, without installing node? 如何在节点模块中保存用户指定的配置? - How can I save a user specifig config in a node module? 可以在Node js后端代码中进行构建吗? 如果是的话,如何使用npm获取节点js? - can i get build in node js back-end code ? if yes means, how to get node js build using npm? 我如何在node.js中将npm请求模块与bluebird一起使用 - How can I use npm request module with bluebird in node.js 如何强制Node的请求模块不对响应进行编码? - How can I force Node's request module to not encode the response? 如何模仿我的库是节点模块而不上传到NPM? - How to imitate my library is a node module without uploading to the NPM? 我可以在没有 npm 或 node.js 的情况下使用 .dotenv 库作为 HTML 脚本导入吗? - Can I use .dotenv library as HTML script imports only without npm or node.js? 如何在不使用 npm 的情况下选择 windows 端子中的 NODE_ENV? - How can I choose the NODE_ENV in windows terminal without using npm? 节点'readline'模块没有'结束'事件 - 如果没有更多行,我该怎么办? - Node 'readline' module does not have an 'end' event - how can I do something when there are no more lines? 从npm全局模块生成文件到用户的当前路径 - Generate a file From npm global module To the user's current path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM