最近有个项目需要把公司的一个网站打包成电脑的桌面应用,网上搜了一下决定用nw.js来做,搞完之后本地预览都正常,但是在用nw-builder进行打包的时候总是出现各种问题。
C:\Users\caojianfei\AppData\Roaming\npm\node_modules\nw\nwjs\application>node builder.js
Using v0.15.4
Create cache folder in C:\Users\caojianfei\AppData\Roaming\npm\node_modules\nw\nwjs\application\cache\0.15.4
Downloading: http://dl.nwjs.io/v0.15.4/nwjs-sdk-v0.15.4-win-x64.zip
undefined
Unable to download NWjs.
上面的是一种,还有的就是下载到一半的时候就停了,眼看就要成功了就不行了,真是莫名奇妙,期间换过镜像什么的都不行。当然也成功过一次,可惜那是个测试的。
有人知道该怎么办嘛?这个问题困扰了我两天了,解决不了实在难受啊。或者还有其他的办法可以打包吗?
The image cannot handle the prebuilt part of downloading, install vpn, and then go to the official npm registry and try again
Sometimes the download stops when it reaches 80 or 90, and then after a long time, an error is reported. I am speechless
I use NSIS packaging and use HMNISEdit to generate or edit packaging scripts.
Switch to the yarn source management tool and the download is successful. You can try it