IHTSDO / sct-snapshot-rest-api

Rest API for SNOMED CT Snapshot views, powered by Node.js, Express & MongoDB
Apache License 2.0
60 stars 44 forks source link

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function #38

Open liquid36 opened 6 years ago

liquid36 commented 6 years ago

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.

ghost commented 5 years ago

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

liquid36 commented 5 years ago

For now, I comment this line.

kaicode commented 5 years ago

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

subhashreeramanathan commented 5 years ago

Hi

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

liquid36 commented 5 years ago

I commented this line and it seems to work well.

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