Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup doesnt start correctly by passing the step "Launching dev servers for renderer process code" in VSCode #3593

Closed
3 tasks done
ThisIsLuckyluck opened this issue May 7, 2024 · 1 comment

Comments

@ThisIsLuckyluck
Copy link

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.4.0

Electron version

30.0.2

Operating system

Windows 11

Last known working Electron Forge version

No response

Expected behavior

Launching the electron app to code my app.

Actual behavior

So I'm trying to dev an electron app with react and like a normal person I am going to the official documentation.
So I followed the guide and when everything is done (check it and done it the same process multiple times) I do the command npm start
when I do that command my terminal output me this :
`PS C:\Users<>\path\to\my\project> npm start

MyProject@1.0.0 start
electron-forge start

✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [1s]
✔ Running generateAssets hook
✔ [plugin-webpack] Compiling main process code [1s]
⠦ [plugin-webpack] Launching dev servers for renderer process code
PS C:\Users<>\path\to\my\project>`

Like we can see the part "[plugin-webpack] Launching dev servers for renderer process code" isn't finished. The first times I thought it was me doing something bad so I went to YouTube to see what others people has done with the same template and it's working for them.

I've describe my error on google some people had the same problem but the solution given in this issue doesn't work for me.

To make short the launch has been edited by creating a launch.json file in the .vscode file.

So I'm actually stuck and searching if it's my process to do the project which is bad or just a "real bug".

Steps to reproduce

So here I describe all I've done from the beginning.

First command done :
npm init electron-app@latest my-new-app -- --template=webpack

adding that code part in the webpack.rules.js :
module.exports = [ // ... existing loader config ... { test: /\.jsx?$/, use: { loader: 'babel-loader', options: { exclude: /node_modules/, presets: ['@babel/preset-react'] } } } // ... existing loader config ... ];

adding react dependencies
npm install --save react react-dom

I've done once the set up of the babel-loader module with the React preset in webpack.rules.js.

And finally do
npm i
and then you know the following.

Thanks for taking time to read my problem and helping me to solve it.

Additional information

No response

@ThisIsLuckyluck
Copy link
Author

Okay nevermind I've restarted my computer after some other edits and it's working. I don't know if my edit change really something or just my computer which can't launch with the port.
Here's my launch.json file :
{ "version": "0.2.0", "configurations": [ { "command": "npm start", "name": "Run npm start", "request": "launch", "type": "node-terminal" }, { "type": "node", "request": "launch", "name": "Launch Program", "skipFiles": ["<node_internals>/**"], "program": "${workspaceFolder}\\webpack.plugins.ts", "preLaunchTask": "tsc: build - tsconfig.json", "outFiles": ["${workspaceFolder}/dist/**/*.js"] } ] }
Sorry for the useless issues...
Have a good day !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant