您的位置:首页 > 健康 > 养生 > 网页制作教程和素材_武汉建站之星信息科技有限公司_石家庄seo优化_2345网址导航官网官方电脑版

网页制作教程和素材_武汉建站之星信息科技有限公司_石家庄seo优化_2345网址导航官网官方电脑版

2024/12/23 14:37:04 来源:https://blog.csdn.net/maplblue/article/details/142872281  浏览:    关键词:网页制作教程和素材_武汉建站之星信息科技有限公司_石家庄seo优化_2345网址导航官网官方电脑版
网页制作教程和素材_武汉建站之星信息科技有限公司_石家庄seo优化_2345网址导航官网官方电脑版

No.

问题解决方法参考
1Warning: description is missed in the package.json (D:\LaserWeb4-Binaries\package.json)
No native production dependencies
Packaging for win32 x64 using electron 1.8.8 to dist\win-unpacked
Unhandled rejection Error: Cannot download "https://dl.bintray.com//electron-userland/bin/nsis-3.0.1.10.7z", status 404: Not Found
    at ClientRequest.<anonymous> (D:\LaserWeb4-Binaries\node_modules\electron-builder-http\src\httpExecutor.ts:155:18)

C:\Users\Administrator\AppData\Local\electron-builder\Cache\nsis

过程中涉及两个文件,分别是nsis-3.0.4.1.7z 和nsis-resources-3.4.1.7z
这两个文件都可以通过https://mirrors.huaweicloud.com/electron-builder-binaries/这个网址下载,下载后,不是直接扔到上面的路径下,而是要分别建文件夹,把解压缩的文件分别放里面。

electron build报错,nsis下载不下来的情况_nsis-3.0.4.1.7z-CSDN博客
2

Packaging for win32 x64 using electron 1.8.8 to dist\win-unpacked
TypeError: Invalid Version: 4.0.996-000
    at new SemVer (D:\LaserWeb4-Binaries\node_modules\semver\semver.js:305:11)
    at AppInfo.get versionInWeirdWindowsForm [as versionInWeirdWindowsForm] (D:\LaserWeb4-Binaries\node_modules\electron-builder\src\appInfo.ts:42:27)

build.win.bat修改

set LW_VERSION=%UI_VERSION:~1%-%SERVER_VERSION:~-3%

=>

set LW_VERSION=%UI_VERSION%

3

Packaging for win32 x64 using electron 1.8.8 to dist\win-unpacked
Error: Cannot download "https://dl.bintray.com//electron-userland/bin/winCodeSign-1.7.0.7z", status 404: Not Found
    at ClientRequest.<anonymous> (D:\LaserWeb4-Binaries\node_modules\electron-builder-http\src\httpExecutor.ts:155:18)

oaknacIndex of electron-builder-binaries-local/winCodeSign-1.7.0

参考问题1的解决

Index of electron-builder-binaries-local/winCodeSign-1.7.0
4

No native production dependencies
Packaging for win32 x64 using electron 1.8.8 to dist\win-unpacked
Error: Exit code: 1. Command failed: C:\Users\ASUS\AppData\Local\electron-builder\cache\winCodeSign\winCodeSign-1.7.0\rcedit.exe D:\LaserWeb4-Binaries\dist\win-unpacked\LaserWeb.exe --set-version-string CompanyName  --set-version-string FileDescription LaserWeb --set-version-string ProductName LaserWeb --set-version-string InternalName LaserWeb --set-version-string LegalCopyright Copyright © 2024 LaserWeb --set-version-string OriginalFilename  --set-file-version v4.0.996 --set-product-version 4.0.996.0 --set-icon D:\LaserWeb4-Binaries\build\icon.ico
Fatal error: Unable to parse version string

没找到办法。

临时在build.win.bat文件里面做了修改,去掉version

CALL .\node_modules\.bin\build --em.version=%LW_VERSION% -p never --x64

=>

CALL .\node_modules\.bin\build -p never --x64

4pyhton2.7配置电脑环境变量Path里加入python2.7相关,优先配置
5

unable to find axio.cjs

pkg/prelude/bootstrap.js:1872
      throw error;
      ^

Error: Cannot find module 'C:\snapshot\lw.comm-server\node_modules\axios\dist\node\axios.cjs'

package.json里面加入cjs相关字段;

      "./node_modules/**/*.cjs"

"pkg": {
    "outputPath": "dist",
    "targets": [
      "node12-win-x64"
    ],
    "scripts": [
      "*.js",
      "./node_modules/**/*.js",

ERROR:  webServer error:/index.js :  Not Found

assets加入app/*.js(引申:提示缺什么就在assets里补什么)

"pkg": {
    "outputPath": "dist",
    "targets": [
      "node12-win-x64"
    ],
    "scripts": [
      "./config.js",
      "./firmwareFeatures.js",
      "./grlString.js",
      "./node_modules/**/*.js",
      "./node_modules/**/*.cjs"
    ],
    "assets": [
      "build/background.png",
      "build/icon.icns",
      "build/icon.ico",
      "app/index.html",
      "app/*.svg",
      "app/*.js"
    ]
  },

npm install xxx 安装升级依赖报错 npm ERR! nested aliases not supported

可以试试把package-lock.json文件删除再试试

原因是安装的依赖已经锁定版本了,需要解除锁定才能继续执行

不显示主页面,显示dist文件夹下的文件清单

index.html等几个文件被删除了,添加回去后显示主页面。

参考:

1. 检查webpack配置文件中的publicPath是否正确;

2. 检查webpack-dev-server的配置文件中的contentBase是否正确;

3. 检查webpack-dev-server的配置文件中的host是否正确;

4. 检查webpack-dev-server的配置文件中的port是否正确;

5. 检查webpack-dev-server的配置文件中的open是否正确;

6. 检查webpack-dev-server的配置文件中的historyApiFallback是否正确;

7. 检查webpack-dev-server的配置文件中的proxy是否正确;

8. 检查webpack-dev-server的配置文件中的hot是否正确;

9. 检查webpack-dev-server的配置文件中的inline是否正确;

10. 检查webpack-dev-server的配置文件中的stats是否正确;

Error: Cannot find module 'lw.comm-server' at Module

Downloading electron-v1.8.7-win32-x64.zip
Error: GET https://cdn.npmmirror.com/binaries/electron/1.8.7/electron-v1.8.7-win32-x64.zip returned 404

方法1、更换源,翻墙了的话要关闭。

方法2、离线下载,参考https://zhuanlan.zhihu.com/p/483976136
 

.\node_modules\.bin\electron-rebuild' is not recognized as an internal or external command,
operable program or batch file.

node-pre-gyp http 404 https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.7/serialport-v4.0.7-node-v72-win32-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.7/serialport-v4.0.7-node-v72-win32-x64.tar.gz

查看包的源文件地址: npm view moduleName repository.url

查看包的依赖关系: npm view moduleName dependencies

查看包依赖的node版本:npm view moduleName engines

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com