Node.js prints DEP0111 about process.binding('http_parser')
DEP0111: process.binding()Short answer
DEP0111 is a documentation-only deprecation: Node.js prints it only when pending deprecations are switched on, or when something turns them on for you. Find the package that calls process.binding() with a stack trace, update it, and turn pending warnings off if nothing needs them.
Fix it fast
1Find out which cause you have
Run the same command with stack traces for deprecations. The trace shows which file called process.binding().
node --trace-deprecation node_modules/.bin/ng build2Match what you see, then jump to its fix
What does the error look like?
DEP0111: process.binding()DeprecationWarning
Cause 1 of 2
Pending deprecation warnings are switched on
1Check
Pending deprecations are off by default. They are emitted only with --pending-deprecation or NODE_PENDING_DEPRECATION=1, and DEP0111 is one that depends on it.
echo "$NODE_PENDING_DEPRECATION"
echo "$NODE_OPTIONS"2Fix
Remove the variable or flag from your shell profile, CI settings or package.json script if you did not mean to use it.
unset NODE_PENDING_DEPRECATION
# and remove --pending-deprecation from NODE_OPTIONS if it is there3Verify
Run the command again in a fresh shell.
env -u NODE_PENDING_DEPRECATION node -e "console.log(process.env.NODE_PENDING_DEPRECATION)"Confirmed by nodejs.org
Cause 2 of 2
A dependency still calls process.binding()
1Check
The Node.js docs say process.binding() is for internal Node.js code only. The stack trace shows which package uses it anyway.
node --trace-deprecation node_modules/.bin/ng version 2>&1 | grep -A5 -i deprecat2Fix
Update that package, or the tool that depends on it, to a release that no longer calls process.binding(). While you wait, hide only this warning by its code.
npm update
# temporary: hide only this one
NODE_OPTIONS="--disable-warning=DEP0111" npm start3Verify
Start the app again; no DEP0111 line should print.
NODE_OPTIONS="--trace-deprecation" npm startConfirmed by nodejs.org
How do I stop it coming back?
- Keep dependencies on current releases and read the changelog when a build tool warns.
- Do not use --no-deprecation as a permanent fix; it silences real problems too.
- Keep NODE_OPTIONS in one place so a stray flag does not spread between machines.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Back end
DeprecationWarning: Buffer() is deprecated in Node.js
[DEP0005] DeprecationWarning
Node.js warns when code calls Buffer() or new Buffer().
3 causes, each with a fixBack end
ng serve says it cannot determine the project or target
Cannot determine project for command.
The Angular CLI looked through angular.json for a project that defines the target you asked for (serve, build, test) and found none, or found several and could not pick one.
3 causes, each with a fixBack end
ng fails with Cannot find module @angular/cli/bin/ng
Cannot find module '@angular/cli/bin/ng'
The ng command is the entry point to the Angular CLI package.
2 causes, each with a fixBack end
Angular app shows 'Cannot GET /' when served by a Node.js server
Cannot GET /dashboard
Cannot GET / is Express saying no route or file matches the request.
3 causes, each with a fixBack end
ng serve cannot find the dev-server builder package
Could not find the implementation for builder @angular/build:dev-server
The builder named in angular.json (for example @angular-devkit/build-angular:dev-server) is looked up as an npm package starting from the workspace root.
3 causes, each with a fixBack end
Angular build says it cannot resolve '@angular/localize/init'
Can't resolve '@angular/localize/init' in '/usr/src/app/src'
The build imports @angular/localize, and that package is not in node_modules.
2 causes, each with a fix