Node: ReferenceError: internalBinding is not defined

Created on 19 Dec 2018  路  27Comments  路  Source: nodejs/node

  • Version: v10.14.2
  • Platform: Linux marina02 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem:


I updated node to the latest v10.x.x and now when running gulp I'm getting an error on the util module

internal/util/inspect.js:31
const types = internalBinding('types');
              ^
ReferenceError: internalBinding is not defined
    at internal/util/inspect.js:31:15
    at req_ (/var/www/node/movie-website/node_modules/natives/index.js:137:5)
    at require (/var/www/node/movie-website/node_modules/natives/index.js:110:12)
    at util.js:25:21
    at req_ (/var/www/node/movie-website/node_modules/natives/index.js:137:5)
    at require (/var/www/node/movie-website/node_modules/natives/index.js:110:12)
    at fs.js:42:21
    at req_ (/var/www/node/movie-website/node_modules/natives/index.js:137:5)
    at Object.req [as require] (/var/www/node/movie-website/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/var/www/node/movie-website/node_modules/gulp-nodemon/node_modules/graceful-fs/fs.js:1:99)
question wontfix wrong repo

Most helpful comment

if you still need it, just do the update: npm install [email protected]

All 27 comments

The stack trace should give you a clue, specifically the first (external) module/file mentioned in the stack trace ('natives'), which has a warning in that module's readme that it's is doing things it shouldn't (attempting to reach into node's internals).

Assuming this has been fixed somewhere upstream from your project, updating to the latest gulp-nodemon may help. Otherwise the gulp-nodemon project itself needs to update or have its dependency on graceful-fs removed (if it has not fixed its access into internals).

a similar issue is happening with the node-s3-client (s3 npm package) - https://github.com/andrewrk/node-s3-client/issues/213

same here..

if you still need it, just do the update: npm install [email protected]

npm install [email protected]

Thank you for

Did it solve? I've tried npm install [email protected] and still getting the same error. Should it be installed globally?

Should it be installed globally?

this seems more of a dependency of a dependency issue. You shouldn't install modules globally b/c they won't be installed on other systems if you do. I'm pretty sure this is a problem with the graceful-fs package based on the stacktrace here and the comment I posted in andrewrk/node-s3-client#213.

@JeffersonRodrigues7 thank you.

'npm install [email protected]' works for me.

@JeffersonRodrigues7 it works !!! thank you.
'npm install [email protected]'

To solve this, you could install 'npm install [email protected]' or use nvm library to manage Node version. =)

if you still need it, just do the update: npm install [email protected]

The solution works fine thanks a lot

Hi
I installed the with command : npm install [email protected] , still getting same issue as below

error: uncaughtException: internalBinding is not defined

date=Fri Mar 29 2019 13:01:31 GMT+0530 (India Standard Time), pid=8236, uid=null, gid=null, cwd=C:\Program Files (x86)\Appiumnode_modules\appium, execPath=C:\Program Filesnodejsnode.exe, version=v11.13.0, argv=[C:\Program Filesnodejsnode.exe, C:\Program Files (x86)\Appiumnode_modules\appium\bin\appium.js, --address, 127.0.0.1, --port, 50101], rss=87605248, heapTotal=68366336, heapUsed=34108304, external=194805, loadavg=[0, 0, 0], uptime=842, trace=[column=1, file=evalmachine., function=null, line=25, method=null, native=false, column=1, file=x86)\Appiumnode_modules\appiumnode_modules\md5calculatornode_modules\unzipnode_modules\fstreamnode_modulesgraceful-fs\fs.js, function=Object. (C:\Program Files, line=11, method= (C:\Program Files, native=false, column=30, file=internal/modules/cjs/loader.js, function=Module._compile, line=805, method=_compile, native=false, column=10, file=internal/modules/cjs/loader.js, function=Object.Module._extensions..js, line=816, method=Module._extensions..js, native=false, column=32, file=internal/modul

if you still need it, just do the update: npm install [email protected]

Work for me

To solve this, you could install 'npm install [email protected]' or use nvm library to manage Node version. =)

this worked on my end

npm install [email protected] --> Just saved my life. :-)

thank you for this, npm install [email protected] Worked!

if you still need it, just do the update: npm install [email protected]

Tks @JeffersonRodrigues7

I did the below steps and the issue has been fixed:

  1. Remove node_modules and package--lock.json(if exist)
  2. Run npm cache clean --force
  3. Run npm install
  4. Run npm install [email protected]

I had same issue for my .net core solution.

Steps I did which fixed my error and started to Gulping my mins/js:

  1. Uninstall existing Node.js from [add or remove programs]
  2. Install a new Node.js from https://nodejs.org/en/ [64bit recommended one]
  3. open cmd and check if npm is working
  4. Open my Solution in visual stuido -> Open node.js interactive window from view -> other windows
  5. in the node.js interactive window enter the below command
    .npm [ProjectName] install gulp
    --- dont get confuse here we dont need to write projectname.csproj or d:/repo/projectname.csproj just write projectname as its already inside the solution.
    Thats all, it solved my problem

-Adi

In my case removing the node_modules and lock file then install all again worked.

Running npm install [email protected] worked for me but I also had to run npm rebuild node-sass afterwards as well.

Who can explain why we need to install natives explicitly? I saw natives' author does not recommend to use this package in https://www.npmjs.com/package/natives.

I did the below steps and the issue has been fixed:

  1. Remove node_modules and package--lock.json(if exist)
  2. Run npm cache clean --force
  3. Run npm install
  4. Run npm install [email protected]

This is what worked for me, thanks!

I did the below steps and the issue has been fixed:

  1. Remove node_modules and package--lock.json(if exist)
  2. Run npm cache clean --force
  3. Run npm install

Only with this, it worked! No need to install natives as dependency for me!

'npm install [email protected]' works for me also.

Using node 8.x instead of 10.x solved the issue for me

yarn upgrade

Solved all my problems

Was this page helpful?
0 / 5 - 0 ratings