Here is the complete cmd output when runnning npm run dist:
[email protected] dist
> electron-builder
• electron-builder version=24.13.3 os=10.0.22631
• loaded configuration file=package.json ("build" field)
• loaded parent configuration preset=react-cra
• description is missed in the package.json appPackageFile=C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\package.json
• author is missed in the package.json appPackageFile=C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\package.json
• @electron/rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies
To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`
• writing effective config file=dist\builder-effective-config.yaml
• rebuilding native dependencies [email protected] platform=win32 arch=x64
⨯ cannot execute cause=exit status 1
errorOut=npm ERR! code 1
npm ERR! path C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v29.1' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-electron-v29.1-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-electron-v29.1-win32-unknown-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (electron-v29.1 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-electron-v29.1-win32-unknown-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.12.2 found at "C:\Users\...\AppData\Local\Programs\Python\Python312\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS running in VS Command Prompt, installation path is:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022"
npm ERR! gyp ERR! find VS - will only use this version
npm ERR! gyp ERR! find VS checking VS2022 (17.9.34701.34) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v143
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.22621.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:113:11)
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:69:17)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! gyp ERR! stack at async createBuildDir (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:26)
npm ERR! gyp ERR! stack at async run (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm ERR! gyp ERR! System Windows_NT 10.0.22631
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=C:\\Users\\...\\Documents\\Ausgabeprüfprogramm\\rechnungspruefung-xml\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\...\\Documents\\Ausgabeprüfprogramm\\rechnungspruefung-xml\\node_modules\\canvas\\build\\Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=electron-v29.1"
npm ERR! gyp ERR! cwd C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v29.1' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22631
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\...\\Documents\\Ausgabeprüfprogramm\\rechnungspruefung-xml\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm ERR! node-pre-gyp ERR! cwd C:\Users\...\Documents\Ausgabeprüfprogramm\rechnungspruefung-xml\node_modules\canvas
npm ERR! node-pre-gyp ERR! node -v v20.11.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in: C:\Users\...\AppData\Local\npm-cache\_logs\2024-03-18T09_24_59_699Z-debug-0.log
command='C:\Program Files\nodejs\node.exe' 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' rebuild [email protected]
workingDir=
Here is my package.json:
{
"name": "rechnungspruefung-xml",
"version": "0.1.0",
"type": "module",
"main": "public/electron.js",
"homepage": ".",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.12",
"@mui/material": "^5.15.12",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"buffer": "^6.0.3",
"canvas": "^2.11.2",
"electron-is-dev": "^3.0.1",
"fast-xml-parser": "^4.3.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-pdf": "^7.7.1",
"react-scripts": "5.0.1",
"react-xml-viewer": "^2.0.1",
"sharp": "^0.33.2",
"web-vitals": "^2.1.4",
"xml2js": "^0.6.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"electron-start": "electron .",
"pack": "electron-builder --dir",
"dist": "electron-builder"
},
"build": {
"appId": "com.meinreactelectronapp",
"files": [
"build/**/*",
"public/electron.js",
"public/preload.mjs",
"public/utils/dataHandlers.js",
"public/utils/filePairHandlers.js",
"public/utils/ipcHandlers.js",
"public/utils/fileUtilities.js",
"node_modules/**/*",
"package.json"
],
"directories": {
"buildResources": "assets"
}
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"electron": "^29.1.1",
"electron-builder": "^24.13.3",
"electron-rebuild": "^3.2.9"
}
}
Node v20.11.1 OS: Windows 11
Thank you for any help in advance.
I have to add more none code, thats why i spam some text here. sorry for that. i dont know what information you might need. I have to add more none code, thats why i spam some text here. sorry for that. i dont know what information you might need. I have to add more none code, thats why i spam some text here. sorry for that. i dont know what information you might need. I have to add more none code, thats why i spam some text here. sorry for that. i dont know what information you might need.