Skip to content
New issue

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

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

Already on GitHub? # to your account

Cannot find module 'node:dns' #2798

Closed
xqin opened this issue Jul 16, 2024 · 5 comments · Fixed by #2799
Closed

Cannot find module 'node:dns' #2798

xqin opened this issue Jul 16, 2024 · 5 comments · Fixed by #2799

Comments

@xqin
Copy link
Contributor

xqin commented Jul 16, 2024

Problem description

@grpc/grpc-js@1.11.0 breaking support for node v14.

image
➜ node
Welcome to Node.js v14.16.0.
Type ".help" for more information.
> require('@grpc/grpc-js')
Uncaught Error: Cannot find module 'node:dns'
Require stack:
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/resolver-dns.js
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/http_proxy.js
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/transport.js
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/internal-channel.js
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/channel.js
- /Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/index.js
- <repl>
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/resolver-dns.js',
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/http_proxy.js',
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/transport.js',
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js',
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/internal-channel.js',
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/channel.js',
    '/Users/test/Desktop/Work/rpc/node_modules/@grpc/grpc-js/build/src/index.js',
    '<repl>'
  ]
}

Reproduction steps


mkdir a
cd a
nvm use 14.16.0
npm init -y
npm i @grpc/grpc-js

node -e 'require("@grpc/grpc-js")'

Environment

  • OS name, version and architecture: macOS
  • Node version v14.16.0
  • Node installation method nvm
  • Package name and version @grpc/grpc-js@1.11.0
@smalldice
Copy link

same problem!
Why taking this BREAKING CHANGE into a MINOR version???

@1anZhang
Copy link

same problem!!!!!!!1

@murgatroid99
Copy link
Member

This is fixed in version 1.11.1

@1412335
Copy link

1412335 commented Oct 8, 2024

I faced the same issue when I upgraded to v1.12.0

@murgatroid99
Copy link
Member

That has been fixed (again) in version 1.12.1

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

Successfully merging a pull request may close this issue.

5 participants