ottz0's avatar
Level 2

Node error with Vuejs and Laravel

I have a Vagrant machine, (I've also tried Homestead) and have Laravel (backend folder) and Vuejs (frontend folder) running as seperate apps.

I have installed Vue js using the CLI and can install the vue simple version ok, however when I run the full webpack version I keep getting a node error.

I can run vue js by itself but when I have vue js and Laravel on the same VM I keep getting this error

(node:2157) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Exited with code 3

0 likes
1 reply
ottz0's avatar
Level 2

It's not Laravel or vue but node trying to open a browser.

I commented out opn(uri) from build/dev-server.js to stop headless browser.

console.log('> Starting dev server...')
devMiddleware.waitUntilValid(() => {
  console.log('> Listening at ' + uri + '\n')
  // when env is testing, don't need open it
  if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
    // opn(uri)
  }
  _resolve()
})

Please or to participate in this conversation.