Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to run server: "cannot enable cancellation after promises are in use" #20

Open
GeoffreyEmerson opened this issue Nov 5, 2019 · 2 comments

Comments

@GeoffreyEmerson
Copy link

I'm on MacOS 10.14.6. Tried with Node 8.15.0, 12.13.0 and 13.0.1. I keep getting the same error:

> [email protected] start /Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server
> moleculer-runner services

cannot enable cancellation after promises are in use Error: cannot enable cancellation after promises are in use
    at Service.created (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer-web/src/index.js:80:16)
    at /Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/src/service.js:174:41
    at Array.forEach (<anonymous>)
    at Service._init (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/src/service.js:174:24)
    at Service.parseServiceSchema (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/src/service.js:148:8)
    at new Service (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/src/service.js:57:9)
    at ServiceBroker.createService (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/src/service-broker.js:636:14)
    at ServiceBroker.loadService (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/src/service-broker.js:563:15)
    at /Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/bin/moleculer-runner.js:352:44
    at Array.forEach (<anonymous>)
    at loadServices (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/bin/moleculer-runner.js:352:24)
    at startBroker (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/bin/moleculer-runner.js:422:2)
From previous event:
    at run (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/bin/moleculer-runner.js:439:4)
    at /Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/bin/moleculer-runner.js:453:10
    at processImmediate (internal/timers.js:439:21)
From previous event:
    at Object.<anonymous> (/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/moleculer/bin/moleculer-runner.js:448:3)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `moleculer-runner services`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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!     /Users/gemerson/.npm/_logs/2019-11-05T00_53_09_423Z-debug.log

Contents of log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Users/gemerson/.nvm/versions/node/v12.13.0/bin/node',
1 verbose cli   '/Users/gemerson/.nvm/versions/node/v12.13.0/bin/npm',
1 verbose cli   'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /Users/gemerson/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server/node_modules/.bin:/Users/gemerson/.nvm/versions/node/v12.13.0/bin:/Users/gemerson/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle [email protected]~start: CWD: /Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server
10 silly lifecycle [email protected]~start: Args: [ '-c', 'moleculer-runner services' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `moleculer-runner services`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/gemerson/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (/Users/gemerson/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/gemerson/Projects/elm.frontendmasters/elm-0.19-workshop/intro/server
16 verbose Darwin 18.7.0
17 verbose argv "/Users/gemerson/.nvm/versions/node/v12.13.0/bin/node" "/Users/gemerson/.nvm/versions/node/v12.13.0/bin/npm" "start"
18 verbose node v12.13.0
19 verbose npm  v6.12.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `moleculer-runner services`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
@GeoffreyEmerson
Copy link
Author

After more poking, it looks like this error started happening after I tried to update the vulnerabilities found: found 1160 vulnerabilities (361 low, 30 moderate, 767 high, 2 critical)

Reverting the package.json and package-lock.json to run with the vulnerabilities appears to have allowed the server to start.

@mct-dev
Copy link

mct-dev commented Nov 20, 2019

Same issue. Would be nice to have it fixed though. That's a lot of vulnerabilities...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants