SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.46k stars 1.54k forks source link

Electron3.1 was upgraded to 9.1.0, and then the 'npm run build' and the 'npm run pack' reported errors #1036

Open misterpancn opened 4 years ago

misterpancn commented 4 years ago
Describe the issue / bug.

Electron3.1 was upgraded to 9.1.0, and then the 'npm run build' and the 'npm run pack' reported errors. package.json

The error information is as follows

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'D:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'pack:main'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v14.6.0
4 verbose run-script [ 'prepack:main', 'pack:main', 'postpack:main' ]
5 info lifecycle VueChat@1.1.1~prepack:main: VueChat@1.1.1
6 info lifecycle VueChat@1.1.1~pack:main: VueChat@1.1.1
7 verbose lifecycle VueChat@1.1.1~pack:main: unsafe-perm in lifecycle true
8 verbose lifecycle VueChat@1.1.1~pack:main: PATH: D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\website\idea\vue-chat\node_modules\.bin;D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\website\idea\vue-chat\node_modules\.bin;C:\Users\Dell\bin;D:\Program Files\Git\mingw64\bin;D:\Program Files\Git\usr\local\bin;D:\Program Files\Git\usr\bin;D:\Program Files\Git\usr\bin;D:\Program Files\Git\mingw64\bin;D:\Program Files\Git\usr\bin;C:\Users\Dell\bin;D:\Program Files (x86)\Xshell;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Program Files\Git\cmd;D:\HashiCorp\Vagrant\bin;E:\Program Files\Android\Sdk\platform-tools;E:\Program Files\Android\Sdk\emulator;E:\Program Files\Android\Sdk\tools;E:\Program Files\Android\Sdk\tools\bin;D:\Program Files\nodejs;C:\Users\Dell\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\Dell\AppData\Local\Programs\Python\Python38;C:\Users\Dell\AppData\Local\Microsoft\WindowsApps;D:\Program Files\JetBrains\PyCharm 2019.3.1\bin;D:\Program Files\Microsoft VS Code\bin;C:\Users\Dell\AppData\Roaming\npm;D:\Program Files\Git\usr\bin\vendor_perl;D:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle VueChat@1.1.1~pack:main: CWD: E:\website\idea\vue-chat
10 silly lifecycle VueChat@1.1.1~pack:main: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js'
10 silly lifecycle ]
11 silly lifecycle VueChat@1.1.1~pack:main: Returned: code: 2  signal: null
12 info lifecycle VueChat@1.1.1~pack:main: Failed to exec pack:main script
13 verbose stack Error: VueChat@1.1.1 pack:main: `cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1051:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid VueChat@1.1.1
15 verbose cwd E:\website\idea\vue-chat
16 verbose Windows_NT 10.0.18362
17 verbose argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "pack:main"
18 verbose node v14.6.0
19 verbose npm  v6.14.6
20 error code ELIFECYCLE
21 error errno 2
22 error VueChat@1.1.1 pack:main: `cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js`
22 error Exit status 2
23 error Failed at the VueChat@1.1.1 pack:main script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Tell me about your development environment.

If you are looking to suggest an enhancement or feature, then feel free to remove everything above.

skwsccss commented 3 years ago

Same issue here

liruisen commented 3 years ago

I think you should updata electron-build version