环境
- 视窗 10
- 电子锻造:6.0.0-beta.51
问题
我的电子应用程序electron-forge用于包装。它在 macOS 上构建良好,但有一些错误,我无法通过谷歌搜索关键字找到任何线索
G:\myproj>npm run make
> mam-hub@0.5.0 make G:\myproj
> electron-forge make
An unhandled exception has occurred inside Forge:
Cannot find module '../innerSubscribe'
Require stack:
- G:\myproj\node_modules\rxjs\internal\operators\mergeMap.js
- G:\myproj\node_modules\rxjs\internal\operators\mergeAll.js
- G:\myproj\node_modules\rxjs\internal\operators\concatAll.js
- G:\myproj\node_modules\rxjs\internal\observable\concat.js
- G:\myproj\node_modules\rxjs\index.js
- G:\myproj\node_modules\spawn-rx\lib\src\index.js
- G:\myproj\node_modules\electron-rebuild\lib\src\rebuild.js
- G:\myproj\node_modules\electron-rebuild\lib\src\main.js
- G:\myproj\node_modules\@electron-forge\core\dist\util\rebuild.js
- G:\myproj\node_modules\@electron-forge\core\dist\api\package.js
- G:\myproj\node_modules\@electron-forge\core\dist\api\make.js
- G:\myproj\node_modules\@electron-forge\core\dist\api\index.js
- G:\myproj\node_modules\@electron-forge\cli\dist\util\check-system.js
- G:\myproj\node_modules\@electron-forge\cli\dist\electron-forge.js
Error: Cannot find module '../innerSubscribe'
Require stack:
- G:\myproj\node_modules\rxjs\internal\operators\mergeMap.js
- G:\myproj\node_modules\rxjs\internal\operators\mergeAll.js
- G:\myproj\node_modules\rxjs\internal\operators\concatAll.js
- G:\myproj\node_modules\rxjs\internal\observable\concat.js
- G:\myproj\node_modules\rxjs\index.js
- G:\myproj\node_modules\spawn-rx\lib\src\index.js
- G:\myproj\node_modules\electron-rebuild\lib\src\rebuild.js
- G:\myproj\node_modules\electron-rebuild\lib\src\main.js
- G:\myproj\node_modules\@electron-forge\core\dist\util\rebuild.js
- G:\myproj\node_modules\@electron-forge\core\dist\api\package.js
- G:\myproj\node_modules\@electron-forge\core\dist\api\make.js
- G:\myproj\node_modules\@electron-forge\core\dist\api\index.js
- G:\myproj\node_modules\@electron-forge\cli\dist\util\check-system.js
- G:\myproj\node_modules\@electron-forge\cli\dist\electron-forge.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (G:\myproj\node_modules\rxjs\src\internal\operators\mergeMap.ts:8:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (G:\myproj\node_modules\rxjs\src\internal\operators\mergeAll.ts:2:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mam-hub@0.5.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mam-hub@0.5.0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\me\AppData\Roaming\npm-cache\_logs\2020-08-27T10_09_38_091Z-debug.log
使用 npm 日志
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Apps\\nodejs\\node.exe',
1 verbose cli 'C:\\Apps\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'make'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.3
4 verbose run-script [ 'premake', 'make', 'postmake' ]
5 info lifecycle mam-hub@0.5.0~premake: mam-hub@0.5.0
6 info lifecycle mam-hub@0.5.0~make: mam-hub@0.5.0
7 verbose lifecycle mam-hub@0.5.0~make: unsafe-perm in lifecycle true
8 verbose lifecycle mam-hub@0.5.0~make: PATH: C:\Apps\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;G:\p4-mmt\mam\src\mam-hub\node_modules\.bin;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\;C:\Apps\ConEmu\ConEmu\Scripts;C:\Apps\ConEmu;C:\Apps\ConEmu\ConEmu;C:\Python\Python38\Scripts\;C:\Python\Python38\;C:\Python27\;C:\Python27\Scripts;D:\Downloads\winflexbison-master\bison;C:\Python\Python37-32\Scripts\;C:\Python\Python37-32\;C:\Apps\ImageMagick;C:\Apps\ActiveTCL\bin;C:\Python\Python37\Scripts\;C:\Python\Python37\;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Apps\Csound6_x64\bin;C:\Program Files\dotnet\;C:\Apps\WinMerge;C:\Apps\NextBuild;C:\ProgramData\chocolatey\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Apps\Pandoc\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Apps\Perforce\;C:\Apps\Mercurial\;C:\Apps\_shortcuts;C:\Apps\Android\sdk\platform-tools;C:\Apps\CMake\bin;C:\Apps\LLVM\bin;E:\_dev\Qt\5.13.0\msvc2017_64\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64;C:\Apps\ImageMagick;C:\Apps\nodejs\;C:\Apps\Yarn\bin\;C:\Python\Python37-32\Scripts\;C:\Python\Python37-32\;C:\Users\me\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.4\bin;;C:\Apps\Git\bin;C:\tools\dart-sdk\bin;C:\Users\me\AppData\Roaming\Pub\Cache\bin;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\Apps\Nmap;C:\Apps\VSCode\bin;C:\Program Files\OpenSSL-Win64\bin;C:\Users\me\AppData\Roaming\npm;C:\Apps\nodejs\;C:\Users\me\AppData\Local\Yarn\bin
9 verbose lifecycle mam-hub@0.5.0~make: CWD: G:\p4-mmt\mam\src\mam-hub
10 silly lifecycle mam-hub@0.5.0~make: Args: [ '/d /s /c', 'electron-forge make' ]
11 silly lifecycle mam-hub@0.5.0~make: Returned: code: 1 signal: null
12 info lifecycle mam-hub@0.5.0~make: Failed to exec make script
13 verbose stack Error: mam-hub@0.5.0 make: `electron-forge make`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Apps\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Apps\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid mam-hub@0.5.0
15 verbose cwd G:\p4-mmt\mam\src\mam-hub
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Apps\\nodejs\\node.exe" "C:\\Apps\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "make"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error mam-hub@0.5.0 make: `electron-forge make`
22 error Exit status 1
23 error Failed at the mam-hub@0.5.0 make script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
我用谷歌搜索innerSubscribe但看到的结果很少。所以我怀疑这只是由其他原因引起的虚假错误。
这是我的package.json
{
"name": "myproj",
"productName": "myproj",
"version": "0.5.0",
"description": "my project",
"main": "src/main.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "me",
"email": "me@home.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {
"icon": "src/images/mam"
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "mam_hub"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
"zeromq": "^6.0.0-beta.6"
},
"devDependencies": {
"@electron-forge/cli": "6.0.0-beta.52",
"@electron-forge/maker-deb": "6.0.0-beta.52",
"@electron-forge/maker-rpm": "6.0.0-beta.52",
"@electron-forge/maker-squirrel": "6.0.0-beta.52",
"@electron-forge/maker-zip": "6.0.0-beta.52",
"electron": "9.0.5"
}
}
期待
我希望考虑到我package.json的 ,包装可以在 Windows 和 macOS 上运行。一个月前,一切似乎都很好。不幸的是,我之前没有 CI,当我开始构建 CI 管道时,我遇到了这个问题。
问题
我应该如何解决这个问题?