Closed fallenleavesguy closed 8 years ago
"c:\node_modules/karma-electron" looks strange
Are you using a custom path? We test on Windows via Appveyor with electron-prebuilt
so it sounds exclusive to your machine =/
I didn't use a custom path.I also use electron-prebuilt that installed by npm. and my system is windows 10
As a sanity check, can you try cloning this repository and running its tests?
# Clone this repository
git clone https://github.com/twolfson/karma-electron
cd karma-electron
# Install its dependencies
npm install
# Run its Windows tests
npm run test-windows
> karma-electron@3.2.1 test-windows c:\work\karma-electron
> npm run test-karma-all
> karma-electron@3.2.1 test-karma-all c:\work\karma-electron
> npm run test-karma-single-run && npm run test-karma-failure && npm run test-karma-uncaught-exception && npm run test-karma-karma && npm run test-karma-phantomjs && npm run test-karma-eof-comment && npm run test-karma-source-map
> karma-electron@3.2.1 test-karma-single-run c:\work\karma-electron
> karma start test/integration-test/karma.conf.js --single-run
[31m21 06 2016 19:47:28.767:ERROR [config]: [39mError in config file!
[SyntaxError: Unexpected token ILLEGAL]
SyntaxError: Unexpected token ILLEGAL
at Function (native)
at Function.compile (c:\work\karma-electron\node_modules\minstache\index.js:79:10)
at Object.<anonymous> (c:\work\karma-electron\lib\karma-electron-preprocessor.js:17:26)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (c:\work\karma-electron\lib\index.js:7:3)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test-karma-single-run"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! karma-electron@3.2.1 test-karma-single-run: `karma start test/integration-test/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the karma-electron@3.2.1 test-karma-single-run script 'karma start test/integration-test/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the karma-electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! karma start test/integration-test/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs karma-electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls karma-electron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\work\karma-electron\npm-debug.log
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test-karma-all"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! karma-electron@3.2.1 test-karma-all: `npm run test-karma-single-run && npm run test-karma-failure && npm run test-karma-uncaught-exception && npm run test-karma-karma && npm run test-karma-phantomjs && npm run test-karma-eof-comment && npm run test-karma-source-map`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the karma-electron@3.2.1 test-karma-all script 'npm run test-karma-single-run && npm run test-karma-failure && npm run test-karma-uncaught-exception && npm run test-karma-karma && npm run test-karma-phantomjs && npm run test-karma-eof-comment && npm run test-karma-source-map'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the karma-electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run test-karma-single-run && npm run test-karma-failure && npm run test-karma-uncaught-exception && npm run test-karma-karma && npm run test-karma-phantomjs && npm run test-karma-eof-comment && npm run test-karma-source-map
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs karma-electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls karma-electron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\work\karma-electron\npm-debug.log
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test-windows"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! karma-electron@3.2.1 test-windows: `npm run test-karma-all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the karma-electron@3.2.1 test-windows script 'npm run test-karma-all'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the karma-electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run test-karma-all
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs karma-electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls karma-electron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\work\karma-electron\npm-debug.log
Strange, I don't have time at the moment to debug on Windows. Do you think you could give it a shot?
It doesn't matter.if I know where is wrong,I'll tell you or make a pull request.thank you very much.
Ran into the same problem. the electron
must be capitalized: browsers: [ 'Electron' ]
Ah, nice catch @dwelle. For reference, our casing is consistent with Karma's conventions:
I have solved this by using karma-electron 4.0.
it Doesn't recognize electron-prebuilt on window, but work right on osx. it said: