最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

如何修复Nodejs Electron软件包错误?

运维笔记admin11浏览0评论

如何修复Nodejs Electron软件包错误?

如何修复Nodejs Electron软件包错误?

我正在使用electron boilerplate library库并正在使用纱包管理器。

yarn dev命令运行正常。但是,当我尝试通过yarn包制作一个包时,它不会打包,也不会放文件。显示类似的内容:

yarn run v1.17.3
$ yarn build && electron-builder build --publish never
$ concurrently "yarn build-main" "yarn build-renderer"
$ cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors
$ cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors
[1]
[1] WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel,
we recommend explicitly setting the core-js version you are using via the `corejs` option.
[1]
[1] You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:
[1]
[1]   npm install --save core-js@2    npm install --save core-js@3
[1]   yarn add core-js@2              yarn add core-js@3
[1]
[0]
[0] WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel,
we recommend explicitly setting the core-js version you are using via the `corejs` option.
[0]
[0] You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:
[0]
[0]   npm install --save core-js@2    npm install --save core-js@3
[0]   yarn add core-js@2              yarn add core-js@3
[0]
[0]
[0] WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel,
we recommend explicitly setting the core-js version you are using via the `corejs` option.
[0]
[0] You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:
[0]
[0]   npm install --save core-js@2    npm install --save core-js@3
[0]   yarn add core-js@2              yarn add core-js@3
[0]
[1]
[1] WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel,
we recommend explicitly setting the core-js version you are using via the `corejs` option.
[1]
[1] You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:
[1]
[1]   npm install --save core-js@2    npm install --save core-js@3
[1]   yarn add core-js@2              yarn add core-js@3
[1]
[0] Hash: 259198899971c8b329ed
[0] Version: webpack 4.39.3
[0] Time: 1540ms
[0] Built at: 2019-09-25 11:24:54 AM
[0]                  Asset      Size  Chunks             Chunk Names
[0]     ./app/main.prod.js  2.04 KiB       0  [emitted]  main
[0] ./app/main.prod.js.map  3.16 KiB       0  [emitted]  main
[0] Entrypoint main = ./app/main.prod.js ./app/main.prod.js.map
[0] [./app/main.dev.js] 2.74 KiB {0} [built]
[0] [electron] external "electron" 42 bytes {0} [built]
[0] [path] external "path" 42 bytes {0} [built]
[0] [url] external "url" 42 bytes {0} [built]
[0] yarn build-main exited with code 0
[1] Hash: aa85bcce98cc26b6dafc
[1] Version: webpack 4.39.3
[1] Time: 1592ms
[1] Built at: 2019-09-25 11:24:55 AM
[1]                Asset      Size  Chunks             Chunk Names
[1]     renderer.prod.js     2 KiB       0  [emitted]  main
[1] renderer.prod.js.map  9.24 KiB       0  [emitted]  main
[1] Entrypoint main = renderer.prod.js renderer.prod.js.map
[1] [./app/index.js] 2.64 KiB {0} [built]
[1] [electron] external "electron" 42 bytes {0} [built]
[1] [path] external "path" 42 bytes {0} [built]
[1] [url] external "url" 42 bytes {0} [built]
[1] yarn build-renderer exited with code 0
  • electron-builder version=20.44.4
  • loaded configuration file=package.json ("build" field)
At least electron-updater 4.0.0 is recommended by current electron-builder version. Please set electron-updater version to "^4.0.0"
error Command failed with exit code 1.
info Visit  for documentation about this command.

我不知道为什么会这样。 1周前才打包,我做错了什么?

回答如下:

您解决了吗,您可以提供任何来源吗?

发布评论

评论列表(0)

  1. 暂无评论