MarshallOfSound / electron-devtools-installer

An easy way to ensure Chrome DevTools extensions into Electron
MIT License
1.11k stars 136 forks source link

Version of Electron: 12.0.7 does not match required range >=1.2.1 #187

Closed cawa-93 closed 3 years ago

cawa-93 commented 3 years ago

Recently, I started receiving the next Error on installing VUEJS3_DEVTOOLS extension:

Failed install extension: Error: Version of Electron: 12.0.7 does not match required range >=1.2.1 for extension ljjemllljcmogpfapbkkighbhhppjdbg

My code:

  app.whenReady()
    .then(() => import('electron-devtools-installer'))
    .then(({default: installExtension, VUEJS3_DEVTOOLS}) => installExtension(VUEJS3_DEVTOOLS, {
      loadExtensionOptions: {
        allowFileAccess: true,
      },
    }))
    .catch(e => console.error('Failed install extension:', e));

I also can't install any other extension.

Even if I change the range:

installExtension({...VUEJS3_DEVTOOLS, electron: '12.0.7'})
Error: Version of Electron: 12.0.7 does not match required range 12.0.7 for extension ljjemllljcmogpfapbkkighbhhppjdbg

OR

installExtension({...VUEJS3_DEVTOOLS, electron: '*'})
 Error: Version of Electron: 12.0.7 does not match required range * for extension ljjemllljcmogpfapbkkighbhhppjdbg
cawa-93 commented 3 years ago

The problem is associated with Rollup and Semver. Related:

ssalbdivad commented 3 years ago

In case anyone is looking for a workaround for this, just passing the extension's id prop directly bypasses the version check altogether:

import installExtension, {VUEJS3_DEVTOOLS} from "electron-devtools-installer"

installExtension(VUEJS3_DEVTOOLS.id)