New project files before a single line of code has been added.
Closed this issue · 1 comments
kaisadilla commented
Installed the boilerplate following the guide:
> git clone https://github.com/codesbiome/electron-react-webpack-typescript-2024 my-project-name
> npm install
> npm start
Got the following error:
✖ [plugin-webpack] Launching dev servers for renderer process code
› Compilation errors in the preload: group_0:
asset app_window/preload.js 1.24 MiB [emitted] (name: app_window)
runtime modules 28.4 KiB 14 modules
modules by path ./node_modules/core-js-pure/ 128…
An unhandled rejection has occurred inside Forge:
Error: Compilation errors in the preload: group_0:
asset app_window/preload.js 1.24 MiB [emitted] (name: app_window)
runtime modules 28.4 KiB 14 modules
modules by path ./node_modules/core-js-pure/ 128 KiB 126 modules
modules by path ./node_modules/@pmmmwh/react-refresh-webpack-plugin/ 53.3 KiB 23 modules
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 4 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]
+ 3 modules
modules by path ./src/ 5.77 KiB
./src/renderer/appPreload.tsx 2 KiB [built] [code generated]
+ 2 modules
modules by path ./node_modules/react-refresh/ 20.2 KiB
./node_modules/react-refresh/runtime.js 222 bytes [built] [code generated]
./node_modules/react-refresh/cjs/react-refresh-runtime.development.js 19.9 KiB [built] [code generated]
+ 5 modules
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 (E:\repos\splatform-editor\node_modules\@electron-forge\plugin-webpack\dist\util\AssetRelocatorPatch.js:36:39)
at Hook.eval [as call] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:9:16)
at CompatRuntimeModule.generate (E:\repos\splatform-editor\node_modules\webpack\lib\runtime\CompatRuntimeModule.js:46:66)
at CompatRuntimeModule.getGeneratedCode (E:\repos\splatform-editor\node_modules\webpack\lib\RuntimeModule.js:184:44)
at CompatRuntimeModule.codeGeneration (E:\repos\splatform-editor\node_modules\webpack\lib\RuntimeModule.js:139:30)
at E:\repos\splatform-editor\node_modules\webpack\lib\Compilation.js:3463:22
at E:\repos\splatform-editor\node_modules\webpack\lib\Cache.js:97:34
at Array.<anonymous> (E:\repos\splatform-editor\node_modules\webpack\lib\cache\MemoryCachePlugin.js:45:13)
at E:\repos\splatform-editor\node_modules\webpack\lib\Cache.js:97:19
at Hook.eval [as callAsync] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:19:1)
at Cache.get (E:\repos\splatform-editor\node_modules\webpack\lib\Cache.js:81:18)
at ItemCacheFacade.get (E:\repos\splatform-editor\node_modules\webpack\lib\CacheFacade.js:115:15)
at Compilation._codeGenerationModule (E:\repos\splatform-editor\node_modules\webpack\lib\Compilation.js:3456:9)
at E:\repos\splatform-editor\node_modules\webpack\lib\Compilation.js:3361:11
at arrayIterator (E:\repos\splatform-editor\node_modules\neo-async\async.js:3467:9)
at timesSync (E:\repos\splatform-editor\node_modules\neo-async\async.js:2297:7)
group_0 (webpack 5.91.0) compiled with 1 error in 1947 ms
group_0:
asset app_window/index.js 4.31 MiB [emitted] (name: app_window)
asset assets/c617fbcf9f2482dea988.png 8.14 KiB [emitted] [immutable] [from: assets/icons/electron.png] (auxiliary name: app_window)
asset app_window/index.html 219 bytes [emitted]
runtime modules 28.6 KiB 16 modules
modules by path ./node_modules/ 1.47 MiB 195 modules
modules by path ./src/ 71.1 KiB
modules by path ./src/renderer/ 65.3 KiB 11 modules
modules by path ./src/main/window/*.ts 5.82 KiB
./src/main/window/titlebarMenus.ts 4.39 KiB [built] [code generated]
./src/main/window/titlebarContextApi.ts 1.43 KiB [built] [code generated]
asset modules 23.5 KiB (javascript) 8.14 KiB (asset)
./assets/images/logo.png 4.53 KiB [built] [code generated]
./assets/icons/chrome.png 1.78 KiB [built] [code generated]
./assets/icons/react.png 2.06 KiB [built] [code generated]
./assets/icons/typescript.png 3.49 KiB [built] [code generated]
./assets/icons/erwt.png 4.53 KiB [built] [code generated]
./assets/icons/electron.png 42 bytes (javascript) 8.14 KiB (asset) [built] [code generated]
+ 3 modules
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 (E:\repos\splatform-editor\node_modules\@electron-forge\plugin-webpack\dist\util\AssetRelocatorPatch.js:36:39)
at Hook.eval [as call] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:9:16)
at CompatRuntimeModule.generate (E:\repos\splatform-editor\node_modules\webpack\lib\runtime\CompatRuntimeModule.js:46:66)
at CompatRuntimeModule.getGeneratedCode (E:\repos\splatform-editor\node_modules\webpack\lib\RuntimeModule.js:184:44)
at CompatRuntimeModule.codeGeneration (E:\repos\splatform-editor\node_modules\webpack\lib\RuntimeModule.js:139:30)
at E:\repos\splatform-editor\node_modules\webpack\lib\Compilation.js:3463:22
at E:\repos\splatform-editor\node_modules\webpack\lib\Cache.js:97:34
at Array.<anonymous> (E:\repos\splatform-editor\node_modules\webpack\lib\cache\MemoryCachePlugin.js:45:13)
at E:\repos\splatform-editor\node_modules\webpack\lib\Cache.js:97:19
at Hook.eval [as callAsync] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:19:1)
at Cache.get (E:\repos\splatform-editor\node_modules\webpack\lib\Cache.js:81:18)
at ItemCacheFacade.get (E:\repos\splatform-editor\node_modules\webpack\lib\CacheFacade.js:115:15)
at Compilation._codeGenerationModule (E:\repos\splatform-editor\node_modules\webpack\lib\Compilation.js:3456:9)
at E:\repos\splatform-editor\node_modules\webpack\lib\Compilation.js:3361:11
at arrayIterator (E:\repos\splatform-editor\node_modules\neo-async\async.js:3467:9)
at timesSync (E:\repos\splatform-editor\node_modules\neo-async\async.js:2297:7)
group_0 (webpack 5.91.0) compiled with 1 error in 1924 ms
at E:\repos\splatform-editor\node_modules\@electron-forge\plugin-webpack\dist\WebpackPlugin.js:220:43
at Hook.eval [as call] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
at Hook.CALL_DELEGATE [as _call] (E:\repos\splatform-editor\node_modules\tapable\lib\Hook.js:14:14)
at E:\repos\splatform-editor\node_modules\webpack\lib\MultiCompiler.js:100:22
at Hook.eval [as callAsync] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:29:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (E:\repos\splatform-editor\node_modules\tapable\lib\Hook.js:18:14)
at Watching._done (E:\repos\splatform-editor\node_modules\webpack\lib\Watching.js:309:28)
at E:\repos\splatform-editor\node_modules\webpack\lib\Watching.js:224:21
at Compiler.emitRecords (E:\repos\splatform-editor\node_modules\webpack\lib\Compiler.js:1028:5)
at E:\repos\splatform-editor\node_modules\webpack\lib\Watching.js:200:22
at E:\repos\splatform-editor\node_modules\webpack\lib\Compiler.js:990:14
at Hook.eval [as callAsync] (eval at create (E:\repos\splatform-editor\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (E:\repos\splatform-editor\node_modules\tapable\lib\Hook.js:18:14)
at E:\repos\splatform-editor\node_modules\webpack\lib\Compiler.js:987:27
at E:\repos\splatform-editor\node_modules\neo-async\async.js:2818:7
at done (E:\repos\splatform-editor\node_modules\neo-async\async.js:3522:9)
Thanks for reading this, I'm not sure if there's something obvious I'm missing, or if this repo is broken right now, so any answer is appreciated.
codesbiome commented
Hello @kaisadilla, it seems to be working fine when tried the latest version using git clone here.
Based on the logs you've provided, it appears there might be an issue with the version of the @vercel/webpack-asset-relocator-loader
package. Could you also try re-cloning the repository and reinstalling dependencies using "yarn" or "pnpm"?