Gulp: After update to Node 11.0.0 running Gulp exits with 'ReferenceError: internalBinding is not defined'

Created on 24 Oct 2018  路  11Comments  路  Source: gulpjs/gulp

I am running MacOS 10.13.6 and use Homebrew to keep Node and NPM up to date. I've updated to Node '11.0.0' and NPM '6.4.1' today. I've installed Gulp '3.9.1' globally. When i try to run Gulp in my project folder i get the following error (before '11.0.0' everything worked flawlessly):

$> gulp
fs.js:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at fs.js:25:1
    at req_ (/Users/danton/SitesLocal/myapp/app/public/node_modules/natives/index.js:140:5)
    at Object.req [as require] (/Users/danton/SitesLocal/myapp/app/public/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/Users/danton/SitesLocal/myapp/app/public/node_modules/graceful-fs/fs.js:1:99)
    at Module._compile (internal/modules/cjs/loader.js:707:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
    at Module.load (internal/modules/cjs/loader.js:605:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
    at Function.Module._load (internal/modules/cjs/loader.js:536:3)
    at Module.require (internal/modules/cjs/loader.js:643:17)

Is it possible that the error goes back to the following change in Node '11.0.0'

https://github.com/nodejs/node/pull/22146

So that changes have to be applied to graceful-fs and or natives? If you need any further infos let me know. Thanks r.

Most helpful comment

This issue is not resolved. Reinstalling node_modules doesn't help.

All 11 comments

@rpkoller When you update node you need to run rm -rf node_modules && npm install to rebuild/reinstall your native modules against your new node version.

@contra at first thanks for the fast answer and sorry didn't knew that you have to rebuild/reinstall against the new version :/ will try when i am back home. thanks again!

I also wouldn't recommend using 3.9.1 with node 11 - they have been threatening to break that version forever and who knows if they finally did it. You can install 4.0.0 with npm install gulp@next but you'll likely need to migrate any existing gulpfile to the new syntax (check out our new docs!)

I was using yarn and had updated it then i suddenly started encountering this problem.
i just ran yarn upgrade in my project folder
Everything works fine

This issue is not resolved. Reinstalling node_modules doesn't help.

I am also experiencing the same issue, as well.

Update to [email protected]. Run npm install [email protected].

Update to [email protected]. Run npm install [email protected].

it works, thank you!

I confirm, this works.

Update to [email protected]. Run npm install [email protected].

This definitely works! I think you've saved me hours of looking for a solution.

Update to [email protected]. Run npm install [email protected].

Yes, worked for me too

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lgg picture lgg  路  3Comments

amio picture amio  路  3Comments

aaronroberson picture aaronroberson  路  4Comments

yapcheahshen picture yapcheahshen  路  5Comments

LuckStock picture LuckStock  路  4Comments