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

Failed to host and connect #27

Open
jpa44 opened this issue Nov 2, 2020 · 7 comments
Open

Failed to host and connect #27

jpa44 opened this issue Nov 2, 2020 · 7 comments

Comments

@jpa44
Copy link

jpa44 commented Nov 2, 2020

Hi
i'm using vue-cli-service with your exemple and i have this error : Failed to host and connect. I'm blocked and i don't kno how to solve this thanks !

> vue-cli-service electron:serve

 INFO  Starting development server...
 WARN  Express server  You have to launch the express server before if you want to use relative path in your code!
98% after emitting CopyPlugin

 DONE  Compiled successfully in 4528ms                                                                          10:21:51


  App running at:
  - Local:   http://localhost:8081/
  - Network: http://192.168.1.26:8081/

  Note that the development build is not optimized.
  To create a production build, run yarn build.

|  Bundling main process...

 DONE  Compiled successfully in 4346ms                                                                          10:21:56

  File                      Size                                         Gzipped

  dist_electron\index.js    3259.55 KiB                                  690.34 KiB

  Images and other types of assets omitted.

 INFO  Launching Electron...
initialize
Error: Failed to host and connect.
    at initOBS (webpack:///./obsRecorder.js?:40:25)
    at Object.initialize (webpack:///./obsRecorder.js?:22:5)
    at App.eval (webpack:///./src/background.js?:107:17)
    at App.emit (events.js:205:15)
(node:8452) UnhandledPromiseRejectionWarning: Error: Exception when initializing OBS process: Error: Failed to host and connect.
@Envek
Copy link
Owner

Envek commented Nov 2, 2020

What is your OS and Node version? I've tested it only on Windows with Node,js 12.

Does it work without that vue-cli-service (sorry, I don't know what is it), if you just do yarn install and yarn start (as stated in README)?

@jpa44
Copy link
Author

jpa44 commented Nov 2, 2020

hey i'm on windows 10 with :
node : 12.4.0 and electron 6.1.9

i use vue-cli-plugin-electron-builder to works with vuejs on electron. Without this package the example works fine.

i use npm i will try with yarn to see
Thanks ;)

@hrueger
Copy link
Contributor

hrueger commented Nov 2, 2020

@jpa44 I have an Angular project and it internally uses Webpack (which I belive your vue-cli-plugin-electron-builder does, too). I had to add a loader for .node files. See those lines.

@jpa44
Copy link
Author

jpa44 commented Nov 2, 2020

@hrueger yes i did this in my vue.config.js because i struggled with NODE_MODULE_VERSION error
i will take a look to your main.js btw
Thanks !

  chainWebpack: config => {
    config.module
        .rule('node')
        .test(/\.node?$/)
        .use('node-loader')
        .loader('node-loader')
        .end()
  },

@hamburger-l
Copy link

@hrueger yes i did this in my vue.config.js because i struggled with NODE_MODULE_VERSION error
i will take a look to your main.js btw
Thanks !

  chainWebpack: config => {
    config.module
        .rule('node')
        .test(/\.node?$/)
        .use('node-loader')
        .loader('node-loader')
        .end()
  },

@hrueger yes i did this in my vue.config.js because i struggled with NODE_MODULE_VERSION error
i will take a look to your main.js btw
Thanks !

  chainWebpack: config => {
    config.module
        .rule('node')
        .test(/\.node?$/)
        .use('node-loader')
        .loader('node-loader')
        .end()
  },

Have you solved the problem?

@hrueger
Copy link
Contributor

hrueger commented Aug 9, 2021

Me or @jpa44 ?

@hamburger-l
Copy link

Me or @jpa44 ?

@jpa44

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

4 participants