Electron-vue: problems with npm install and npm run dev

Created on 18 Apr 2018  路  2Comments  路  Source: SimulatedGREG/electron-vue

Describe the issue / bug.

I created a fresh project using electron-vue and encountered problems with a chromedriver download during install. I tried to ignore those and run npm run dev nevertheless which crashed saying Electron failed to install correctly, please delete node_modules/electron and try installing again. I deleted node_modules/electron and ran npm install again which gave me the same error message about the chromedriver.
Terminal logs:

 D:\Documents\Code\markdownfox-new> npm install
npm WARN deprecated [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify

> [email protected] install D:\Documents\Code\markdownfox-new\node_modules\electron-chromedriver
> node ./download-chromedriver.js

D:\Documents\Code\markdownfox-new\node_modules\electron-chromedriver\download-chromedriver.js:30
  if (err != null) throw err
                   ^

Error: Generated checksum for "chromedriver-v1.8.0-win32-x64.zip" did not match expected checksum.
    at Hash.hasher.on (D:\Documents\Code\markdownfox-new\node_modules\electron-chromedriver\node_modules\sumchecker\index.js:151:20)
    at Hash.emit (events.js:180:13)
    at emitReadable_ (_stream_readable.js:520:10)
    at emitReadable (_stream_readable.js:514:7)
    at addChunk (_stream_readable.js:280:7)
    at readableAddChunk (_stream_readable.js:256:11)
    at Hash.Readable.push (_stream_readable.js:213:10)
    at Hash.Transform.push (_stream_transform.js:146:32)
    at Hash._flush (internal/crypto/hash.js:43:8)
    at Hash.prefinish (_stream_transform.js:136:10)
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./download-chromedriver.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lx4r\AppData\Roaming\npm-cache\_logs\2018-04-18T09_16_26_327Z-debug.log
PS D:\Documents\Code\markdownfox-new> npm run dev

> [email protected] dev D:\Documents\Code\markdownfox-new
> node .electron-vue/dev-runner.js

D:\Documents\Code\markdownfox-new\node_modules\electron\index.js:9
  throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
  ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at Object.<anonymous> (D:\Documents\Code\markdownfox-new\node_modules\electron\index.js:9:9)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\Documents\Code\markdownfox-new\.electron-vue\dev-runner.js:4:18)
    at Module._compile (module.js:649:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `node .electron-vue/dev-runner.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lx4r\AppData\Roaming\npm-cache\_logs\2018-04-18T09_16_46_060Z-debug.log
How can I reproduce this problem?
  • vue init simulatedgreg/electron-vue test
  • cd test
  • npm install
  • npm run dev
Tell me about your development environment.
  • Node version: v9.9.0
  • NPM version: 6.0.0-next.1
  • vue-cli version: (if necessary)
  • Operating System: Windows 10

Thanks in advance for the help 馃檪

Most helpful comment

Found the solution myself here:
Deleting C:\Users\<username>\AppData\Local\electron solved the issue on Windows 10.
On my Mac I deleted all folders with the prefix electron under /Users/<username>/.npm.

Sorry for bothering you, hope this helps some people 馃檪.

All 2 comments

Found the solution myself here:
Deleting C:\Users\<username>\AppData\Local\electron solved the issue on Windows 10.
On my Mac I deleted all folders with the prefix electron under /Users/<username>/.npm.

Sorry for bothering you, hope this helps some people 馃檪.

Works for me , thanks a lot.

Was this page helpful?
0 / 5 - 0 ratings