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

Receiving error Cannot find module 'node:querystring' #1

Open
tristanyong opened this issue Apr 5, 2023 · 1 comment
Open

Receiving error Cannot find module 'node:querystring' #1

tristanyong opened this issue Apr 5, 2023 · 1 comment

Comments

@tristanyong
Copy link

tristanyong commented Apr 5, 2023

Good afternoon,

I am currently using the library with google firebase cloud functions. However after installing using
"npm install myinfo-connector-v4-nodejs"

I receive the following error when i try to test the function:

Stacktrace:
Error: Cannot find module 'node:querystring'
Require stack:

  • /Users/outside/Project/inside-cloud/functions/node_modules/myinfo-connector-v4-nodejs/lib/requestHandler.js
  • /Users/outside/Project/inside-cloud/functions/node_modules/myinfo-connector-v4-nodejs/index.js
  • /Users/outside/Project/inside-cloud/functions/NDIVerification/test.js
  • /Users/outside/Project/inside-cloud/functions/index.js
  • /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object. (/Users/outside/Project/inside-cloud/functions/node_modules/myinfo-connector-v4-nodejs/lib/requestHandler.js:7:21)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object. (/Users/outside/Project/inside-cloud/functions/node_modules/myinfo-connector-v4-nodejs/index.js:4:24)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    ⚠ We were unable to load your functions code. (see above)

I have went into the module folder and removed the "node:" portion within the request handler to allow the emulation to work. However when i deploy to the cloud this issue reappears again. Is there any other way which I may look at to avoid this issue?

Thank you

@ByronKweh
Copy link

Could I have more details on your environment such as node version, etc. so that I may try reproduce the issue?

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