Open eXhumer opened 2 weeks ago
Four days ago (as of May 20, 2024), version 1.7.4 of the @vercel/webpack-asset-relocator-loader package was released
At the moment it is not compatible, so if you get this error, go to the package.json, and in the dependencies look for this:
@vercel/webpack-asset-relocator-loader@^1.7.3
remove the hat so that it looks like this:
@vercel/webpack-asset-relocator-loader@1.7.3
And remove node_modules folder and reinstall with npm install / yarn or similar. This is a temporary solution until a new version is released.
All the best!
Hey @eXhumer and @robertomsen, thanks for the reports here! This is definitely related to a PR landing upstream in the webpack-asset-relocator-loader
module (specifically this one: https://github.com/vercel/webpack-asset-relocator-loader/pull/185). We'll get this fixed
Did @vercel/webpack-asset-relocator-loader
introduce a breaking change in a patch version there? Maybe ask them nicely to not do that in the future 🤔
Pre-flight checklist
Electron Forge version
7.4.0
Electron version
30.0.6
Operating system
macOS 14.4.1 (arm64)
Last known working Electron Forge version
No response
Expected behavior
Able to upgrade outdated dependency for a package without breaking development build.
Actual behavior
Upon running
npm upgrade
on package, I can no longer start the development build withstart
script as it fails with the following error.Console output with errors
``` ➜ exhumer@EXHUMER-MACBOOK-AIR ~/Projects npm create electron-app hello-electron -- --template=webpack-typescript > npx > create-electron-app hello-electron --template=webpack-typescript ✔ Locating custom template: "webpack-typescript" ✔ Initializing directory ✔ Preparing template ✔ Initializing template ✔ Installing template dependencies ➜ exhumer@EXHUMER-MACBOOK-AIR ~/Projects cd hello-electron && npm start > hello-electron@1.0.0 start > electron-forge start ✔ Checking your system ✔ Locating application ✔ Loading configuration ✔ Preparing native dependencies [0.1s] ✔ Running generateAssets hook ✔ [plugin-webpack] Compiling main process code [0.3s] ✔ [plugin-webpack] Launching dev servers for renderer process code [0.9s] › Output Available: http://localhost:9000 [ForkTsCheckerWebpackPlugin] Type-checking in progress... [ForkTsCheckerWebpackPlugin] No errors found. [89591:0517/022137.671400:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1) ➜ exhumer@EXHUMER-MACBOOK-AIR ~/Projects/hello-electron git:(main) ✗ npm outdat`ed` Package Current Wanted Latest Location Depended by @typescript-eslint/eslint-plugin 5.62.0 5.62.0 7.9.0 node_modules/@typescript-eslint/eslint-plugin hello-electron @typescript-eslint/parser 5.62.0 5.62.0 7.9.0 node_modules/@typescript-eslint/parser hello-electron @vercel/webpack-asset-relocator-loader 1.7.3 1.7.4 1.7.4 node_modules/@vercel/webpack-asset-relocator-loader hello-electron css-loader 6.11.0 6.11.0 7.1.1 node_modules/css-loader hello-electron eslint 8.57.0 8.57.0 9.2.0 node_modules/eslint hello-electron fork-ts-checker-webpack-plugin 7.3.0 7.3.0 9.0.2 node_modules/fork-ts-checker-webpack-plugin hello-electron style-loader 3.3.4 3.3.4 4.0.0 node_modules/style-loader hello-electron typescript 4.5.5 4.5.5 5.4.5 node_modules/typescript hello-electron ➜ exhumer@EXHUMER-MACBOOK-AIR ~/Projects/hello-electron git:(main) ✗ npm upgrade added 13 packages, removed 11 packages, changed 6 packages, and audited 920 packages in 4s 184 packages are looking for funding run `npm fund` for details found 0 vulnerabilities ➜ exhumer@EXHUMER-MACBOOK-AIR ~/Projects/hello-electron git:(main) ✗ npm start > hello-electron@1.0.0 start > electron-forge start ✔ Checking your system ✔ Locating application ✔ Loading configuration ✔ Preparing native dependencies [0.1s] ✔ Running generateAssets hook ✔ [plugin-webpack] Compiling main process code [0.3s] ✖ [plugin-webpack] Launching dev servers for renderer process code › Compilation errors in the preload: group_0: asset main_window/preload.js 553 KiB [emitted] (name: main_window) runtime modules 26.3 KiB 12 modules modules by path ./node_modules/ 160 KiB modules by path ./node_modules/webpack-dev-server/client/ 71.8 KiB 16 modules modules by path ./node_modules/webpack/hot/*.js 5.18 KiB ./node_modules/webpack/hot/dev-server.js 1.94 KiB [built] [code generated] ./node_modules/webpack/hot/log.js 1.74 KiB [built] [code generated] + 2 modules modules by path ./node_modules/html-entities/lib/*.js 78.9 KiB ./node_modules/html-entities/lib/index.js 4.84 KiB [built] [code generated] ./node_modules/html-entities/lib/named-references.js 73.1 KiB [built] [code generated] ./node_modules/html-entities/lib/numeric-unicode-map.js 389 bytes [built] [code generated] ./node_modules/html-entities/lib/surrogate-pairs.js 583 bytes [built] [code generated] ./node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated] ./src/preload.ts 158 bytes [built] [code generated] external "events" 42 bytes [built] [code generated] ERROR in webpack/runtime/compat The installed version of @vercel/webpack-asset-relocator-loader does not appear to be compatible with Forge Error: The installed version of @vercel/webpack-asset-relocator-loader does not appear to be compatible with Forge at tapInfo.fn (/Users/exhumer/Projects/hello-electron/node_modules/@electron -forge/plugin-webpack/src/util/AssetRelocatorPatch.ts:45:23) at Hook.eval (eval at create (/Users/exhumer/Projects/hello-electron/node_mo dules/tapable/lib/HookCodeFactory.js:19:10),Steps to reproduce
Additional information
@vercel/webpack-asset-relocator-loader
recently released a version 1.7.4. The package is added to a clean build of electron-forge with@vercel/webpack-asset-relocator-loader@^1.7.3
. Runningnpm upgrade
will cause this issue to appear. I modified bypackage.json
to modify the the dependency to remove^
and rerunningnpm upgrade
, locking it to 1.7.3, which seems to fix the issue for now.