1

I am trying to startup vue-devtools from within my app but I am getting an error:

Uncaught Exception:
Error: spawn vue-devtools ENOENT
    at Process.ChildProcess._handle.onexit
    at onErrorNT
    at processTicksAndRections

I am using the following which is giving me this error:

app.on('ready', async () => {
  if (isDevelopment && !process.env.IS_TEST) {
    let devtools = cp.spawn('vue-devtools')
  }
  createWindow()
})

I installed devtools globally using

npm i -g @vue/devtools

So, when I run I would expect the program to run. What is causing it to not execute?

Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338

1 Answers1

1

The answer was quite simple. I just needed to pass shell: true to the options.

app.on('ready', async () => {
  if (isDevelopment && !process.env.IS_TEST) {
    let devtools = cp.spawn('vue-devtools', {
      cwd: __dirname,
      shell: true,
      windowsHide: true
    })
  }
  createWindow()
})
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338