sct-snapshot-rest-api icon indicating copy to clipboard operation
sct-snapshot-rest-api copied to clipboard

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function

Open liquid36 opened this issue 5 years ago • 5 comments

I'm getting this error when running the app:

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:129:9)
    at Object.writeFile (fs.js:1137:14)
    at Object.<anonymous> (/app/sct-snapshot-rest-api/app.js:109:8)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:279:19)

https://github.com/IHTSDO/sct-snapshot-rest-api/blob/3ce4ab6a0eba407697a7ab4a1e9e2f3e24b3cd61/app.js#L109

which version of NodeJs should I use? The error happen in local environment and also when i build the docker image.

liquid36 avatar Sep 27 '18 17:09 liquid36

I'm getting the same error. It was working all this time.

ghost avatar Nov 27 '18 13:11 ghost

For now, I comment this line.

liquid36 avatar Dec 14 '18 11:12 liquid36

We don't have an internal team working on this Node implementation at the moment. We welcome collaboration between implementers within the community. Thanks @liquid36

kaicode avatar Dec 17 '18 10:12 kaicode

Hi

Am also facing the same issue. Am using Node version 10. is this the cause of the issue? Any help could be appreciatable

subhashreeramanathan avatar Mar 05 '19 05:03 subhashreeramanathan

I commented this line and it seems to work well.

https://github.com/IHTSDO/sct-snapshot-rest-api/blob/3ce4ab6a0eba407697a7ab4a1e9e2f3e24b3cd61/app.js#L109

liquid36 avatar Mar 08 '19 13:03 liquid36