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

Error: Cannot find module 'node:url' #2403

Closed
Jagroop-RTE opened this issue Feb 15, 2024 · 2 comments
Closed

Error: Cannot find module 'node:url' #2403

Jagroop-RTE opened this issue Feb 15, 2024 · 2 comments
Labels
api: storage Issues related to the googleapis/nodejs-storage API. external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@Jagroop-RTE
Copy link

I am getting this error :

Error: Cannot find module 'node:url'
Require stack:
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/https-proxy-agent/dist/index.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/gaxios/build/src/gaxios.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/gaxios/build/src/index.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/gcp-metadata/build/src/index.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/google-auth-library/build/src/auth/googleauth.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/google-auth-library/build/src/index.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/build/cjs/src/nodejs-common/util.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/build/cjs/src/nodejs-common/service.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/build/cjs/src/nodejs-common/index.js
- /home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/build/cjs/src/index.js
- /home/dev9/geeker/winkit-backend/src/utils/googleStorage.ts
- /home/dev9/geeker/winkit-backend/src/controllers/UploadController.ts
- /home/dev9/geeker/winkit-backend/src/routes/uploadRouter.ts
- /home/dev9/geeker/winkit-backend/src/routes/index.ts
- /home/dev9/geeker/winkit-backend/src/app.ts
- /home/dev9/geeker/winkit-backend/src/services/Schedule.ts
- /home/dev9/geeker/winkit-backend/src/socket.ts
- /home/dev9/geeker/winkit-backend/src/index.ts
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/https-proxy-agent/src/index.ts:7:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/gaxios/src/gaxios.ts:33:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/dev9/geeker/winkit-backend/node_modules/@google-cloud/storage/node_modules/gaxios/src/index.ts:15:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
[nodemon] app crashed - waiting for file changes before starting...

Intially it was working fine but today in our production server it start giving this error. We didn't find anything related to this and tried different solutions but didn't work .
How we can resolve this

Environment details

  • OS: Ubuntu
  • Node.js version: 14.17.1
  • npm version: 6.14.13
  • @google-cloud/storage version: 7.7.0

Thanks!

@Jagroop-RTE Jagroop-RTE added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 15, 2024
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Feb 15, 2024
@danielbankhead danielbankhead added the external This issue is blocked on a bug with the actual product. label Feb 15, 2024
@danielbankhead
Copy link
Contributor

Hmmm it seems to have been caused upstream via:

node:url is not available in Node 14, which is a bug. I will follow-up there.

@danielbankhead
Copy link
Contributor

Fixed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants