electron-react-boilerplate / electron-react-boilerplate/electron-react-boilerplate
"Cannot GET /index.html" on fresh install
- Dominant language
- TypeScript
- Stars
- 24.3k
- Forks
- 4k
- Avg merge
- 20m
- Merged PRs (30d)
- 4
Description
## Prerequisites
- [x] Using npm
- [x] Using an up-to-date [`main` branch](https://github.com/electron-react-boilerplate/electron-react-boilerplate/tree/main)
- [x] Using latest version of devtools. [Check the docs for how to update](https://electron-react-boilerplate.js.org/docs/dev-tools/)
- [x] Tried solutions mentioned in [#400](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400)
- [x] For issue in production release, add devtools output of `DEBUG_PROD=true npm run build && npm start`
## Expected Behavior
After cloning the repo, installing the dependencies with "npm i" and running the application with "npm run start" the default page should have happeared in the .
## Current Behavior
In the terminal I get the following error:
```
ERROR in ./assets/icon.svg
Module build failed (from ./node_modules/@svgr/webpack/dist/index.js):
BrowserslistError: Unknown version 31.3.0 of electron
```
And in the process window is displayed the text "Cannot GET /index.html", since the call to get the file fails:

## Steps to Reproduce
1. git clone --depth 1 --branch main https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
2. cd your-project-name
3. npm install
4. npm start
stacktrace:
```
> prestart
> cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.dev.ts
> start
> ts-node ./.erb/scripts/check-port-in-use.js && npm run prestart && npm run start:renderer
> prestart
> cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.dev.ts
> start:renderer
> cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts
Starting preload.js builder...
Starting Main Process...
> start:preload
> cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts
> start:main
> concurrently -k "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --watch --config ./.erb/configs/webpack.config.main.dev.ts" "electronmon ."
[webpack-dev-server] Project is running at:
[webpack-dev-server] Loopback: http://localhost:1212/
[webpack-dev-server] On Your Network (IPv4): http://192.168.1.128:1212/
[webpack-dev-server] Content not from webpack is served from 'C:\Users\dacri\Documents\Projects\your-project-name\public' directory
[webpack-dev-server] 404s will fallback to '/index.html'
[1]
[1] [electronmon] waiting for a change to restart it
[1] 11:39:58.430 > Skip checkForUpdates because application is not packed and dev update config is not forced
[1] 11:39:58.433 > checkForUpdatesAndNotify called, downloadPromise is null
[webpack-dev-middleware] wait until bundle finished: /index.html
ERROR in ./assets/icon.svg
Module build failed (from ./node_modules/@svgr/webpack/dist/index.js):
BrowserslistError: Unknown version 31.3.0 of electron
at Function.select (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:1036:15)
at C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:328:29
at Array.reduce ()
at resolve (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:318:34)
at Function.select (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:1139:14)
at C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:328:29
at Array.reduce ()
at resolve (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:318:34)
at browserslist (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\browserslist\index.js:420:21)
at resolveTargets (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\helper-compilation-targets\src\index.ts:168:20)
at resolveTargetsCached (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\helper-compilation-targets\src\index.ts:181:14)
at getTargets (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\helper-compilation-targets\src\index.ts:250:27)
at resolveTargets (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\core\src\config\resolve-targets.ts:50:20)
at loadPrivatePartialConfig (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\core\src\config\partial.ts:121:28)
at loadPrivatePartialConfig.next ()
at loadFullConfig (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\core\src\config\full.ts:62:49)
at loadFullConfig.next ()
at C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\core\src\transform-ast.ts:29:58
at Generator.next ()
at evaluateSync (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\gensync\index.js:251:28)
at fn (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\gensync\index.js:89:14)
at stopHiding - secret - don't use this - v1 (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\core\src\errors\rewrite-stack-trace.ts:99:14)
at Object.transformFromAstSync (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@babel\core\src\transform-ast.ts:77:59)
at jsxPlugin (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@svgr\plugin-jsx\src\index.ts:63:18)
at run (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@svgr\core\src\transform.ts:13:16)
at Object.transform (C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@svgr\core\src\transform.ts:24:10)
at async C:\Users\dacri\Documents\Projects\your-project-name\node_modules\@svgr\webpack\src\index.ts:45:20
@ ./src/renderer/App.tsx 5:0-41 8:128-132
@ ./src/renderer/index.tsx 5:0-24 8:17-20
webpack compiled with 1 error
Not rewriting GET /index.html because the path includes a dot (.) character.
[1] [5356:0907/114000.352: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)
[1] [5356:0907/114000.352:ERROR:CONSOLE(1)] "Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[1] [5356:0907/114000.491:ERROR:CONSOLE(2)] "Electron sandboxed_renderer.bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (2)
[1] [5356:0907/114000.491:ERROR:CONSOLE(2)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (2)
```
## Your Environment
- Node version : v20.17.0
- electron-react-boilerplate version or branch : main (commit f6eb1503467e7765cf87c00ed6ab8c621323e19e)
- Operating System and version : Windows 11 23H2
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.