glyif / ghost

1 stars 1 forks source link

running npm test throws error about electron installation #1

Open yeungegs opened 7 years ago

yeungegs commented 7 years ago

Followed installation instructions and when i ran npm test in another window, the below error was thrown:

[ghost] npm test                                                             

> ghost@1.0.0 test /home/vagrant/forks/ghost
> mocha

/home/vagrant/forks/ghost/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> (/home/vagrant/forks/ghost/node_modules/electron/index.js:9:9)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/vagrant/forks/ghost/node_modules/nightmare/lib/nightmare.js:16:29)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/vagrant/forks/ghost/test/0-tests.js:1:81)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at /home/vagrant/forks/ghost/node_modules/mocha/lib/mocha.js:231:27
    at Array.forEach (native)
    at Mocha.loadFiles (/home/vagrant/forks/ghost/node_modules/mocha/lib/mocha.js:228:14)
    at Mocha.run (/home/vagrant/forks/ghost/node_modules/mocha/lib/mocha.js:514:10)
    at Object.<anonymous> (/home/vagrant/forks/ghost/node_modules/mocha/bin/_mocha:480:18)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3
npm ERR! Test failed.  See above for more details.
yeungegs commented 7 years ago

After following the instructions in the error log by deleting and reinstalling electron locally I was able to get the tests running. I still think the issue should remain open because the root cause has yet to be identified.