question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"singleRun" option causing crash

See original GitHub issue

In package.json, I have this script defined:

"karma": "node node_modules/karma/bin/karma start test/karma.conf.js --single-run"

This used to work fine. I recently upgraded to OSX El Capitan, and now when I run npm run karma I get:

> node node_modules/karma/bin/karma start test/karma.conf.js --single-run


13 10 2015 16:54:44.277:INFO [karma]: Karma v0.13.10 server started at http://localhost:9876/
13 10 2015 16:54:44.287:INFO [launcher]: Starting browser PhantomJS
13 10 2015 16:54:45.023:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket x2lJEckmT4gGD6Y_AAAA with id 68710047

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/Users/alexreichert/.node/bin/npm" "run" "karma"
npm ERR! node v4.0.0
npm ERR! npm  v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! proteus@2.0.0 karma: `node node_modules/karma/bin/karma start test/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the proteus@2.0.0 karma script 'node node_modules/karma/bin/karma start test/karma.conf.js --single-run'.
npm ERR! This is most likely a problem with the proteus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/karma/bin/karma start test/karma.conf.js --single-run
npm ERR! You can get their info via:
npm ERR!     npm owner ls proteus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/alexreichert/Desktop/haven/npm-debug.log

If I just run

node node_modules/karma/bin/karma start test/karma.conf.js --single-run

or if I remove singleRun: true from my karma.conf.js file, I get:

node node_modules/karma/bin/karma start test/karma.conf.js

13 10 2015 16:58:56.974:INFO [karma]: Karma v0.13.10 server started at http://localhost:9876/
13 10 2015 16:58:56.984:INFO [launcher]: Starting browser PhantomJS
13 10 2015 16:58:57.691:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket rciGbdR8BH3Lxc-pAAAA with id 87704022

But I get no indication of whether tests passed or failed…

This was working fine yesterday, and I’ve been hacking at this for a few hours but I’ve had no luck 😞

Here are my logs:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/Users/alexreichert/.node/bin/npm',
1 verbose cli   'run',
1 verbose cli   'karma' ]
2 info using npm@3.3.6
3 info using node@v4.0.0
4 verbose run-script [ 'prekarma', 'karma', 'postkarma' ]
5 info lifecycle proteus@2.0.0~prekarma: proteus@2.0.0
6 silly lifecycle proteus@2.0.0~prekarma: no script for prekarma, continuing
7 info lifecycle proteus@2.0.0~karma: proteus@2.0.0
8 verbose lifecycle proteus@2.0.0~karma: unsafe-perm in lifecycle true
9 verbose lifecycle proteus@2.0.0~karma: PATH: /Users/alexreichert/.node/lib/node_modules/npm/bin/node-gyp-bin:/Users/alexreichert/Desktop/haven/node_modules/.bin:/Users/alexreichert/.rvm/gems/ruby-2.1.5/bin:/Users/alexreichert/.rvm/gems/ruby-2.1.5@global/bin:/Users/alexreichert/.rvm/rubies/ruby-2.1.5/bin:/Users/alexreichert/.node/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/alexreichert/.rvm/bin
10 verbose lifecycle proteus@2.0.0~karma: CWD: /Users/alexreichert/Desktop/haven
11 silly lifecycle proteus@2.0.0~karma: Args: [ '-c',
11 silly lifecycle   'node node_modules/karma/bin/karma start test/karma.conf.js --single-run' ]
12 silly lifecycle proteus@2.0.0~karma: Returned: code: 1  signal: null
13 info lifecycle proteus@2.0.0~karma: Failed to exec karma script
14 verbose stack Error: proteus@2.0.0 karma: `node node_modules/karma/bin/karma start test/karma.conf.js --single-run`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/Users/alexreichert/.node/lib/node_modules/npm/lib/utils/lifecycle.js:233:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/Users/alexreichert/.node/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:817:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid proteus@2.0.0
16 verbose cwd /Users/alexreichert/Desktop/haven
17 error Darwin 14.5.0
18 error argv "/usr/local/bin/node" "/Users/alexreichert/.node/bin/npm" "run" "karma"
19 error node v4.0.0
20 error npm  v3.3.6
21 error code ELIFECYCLE
22 error proteus@2.0.0 karma: `node node_modules/karma/bin/karma start test/karma.conf.js --single-run`
22 error Exit status 1
23 error Failed at the proteus@2.0.0 karma script 'node node_modules/karma/bin/karma start test/karma.conf.js --single-run'.
23 error This is most likely a problem with the proteus package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     node node_modules/karma/bin/karma start test/karma.conf.js --single-run
23 error You can get their info via:
23 error     npm owner ls proteus
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Help would be greatly appreciated.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
ibaranesscommented, Nov 16, 2017

Hi Guys. I don’t know if it will solve your problem, but I came up with similar problem while running ‘karma --single-run --browsers Chrome’ from npm script. I would get an unclear npm error:

Chrome 61.0.3163 (Windows 10 0.0.0): Executed 0 of 0 ERROR (0.007 secs / 0 secs)

npm ERR! Windows_NT 10.0.15063 npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Users\M.S.BIT\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “run” “test” npm ERR! node v6.9.4 npm ERR! npm v4.1.1 npm ERR! code ELIFECYCLE npm ERR! karma_angular2@1.0.0 test: node ./node_modules/karma/bin/karma start --single-run --browsers Chrome npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the karma_angular2@1.0.0 test script ‘node ./node_modules/karma/bin/karma start --single-run --browsers Chrome’. 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_angular2 package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./node_modules/karma/bin/karma start --single-run --browsers Chrome npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs karma_angular2 npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls karma_angular2 npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\dev\angular2_karma\npm-debug.log

At the end the problem was that I didn’t had any tests and the script would fail. I finally solved it by adding : failOnEmptyTestSuite: false to my karma.conf.js file, so it won’t fail the script when there are no tests. Hope it will help in any way.

2reactions
reichert621commented, Oct 14, 2015

resolved. duplicate method caused by merge conflict lead to this cryptic error message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Karma test runner
The --no-single-run option causes the server to print a URL and wait. Open the URL in a browser and use the browsers devtools...
Read more >
Angular CLI 6 Unknown option: '--singleRun' - Stack Overflow
When I want to execute my tests, I used to have the option --single-run activated, but after upgrading to Angular 6 it is...
Read more >
Why is my add-in crashing? - Microsoft Support
When an Office program restarts after a crash, you should see a message about why it crashed. ... Click File > Help >...
Read more >
The long road risk of rain 2
Rejuvenation Rack: The Long Road: Complete 20 stages in a single run. ... My longest run was 4 hours 15minutes (stage 30) then...
Read more >
how to run multiple commands in powershell
Certutil. de 2019 In this article, Greg Moore explains how to write a PowerShell script that You can run this from the command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found