Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gulp - internalBinding is not defined

Tags:

gulp

I'm getting this error when I try to run the command gulp watch-bs for my UnderStrap child theme for WordPress. I've been using this command for a year with no problems, but I received this error today when I updated my node and npm to their latest versions.

ReferenceError: internalBinding is not defined
    at internal/util/inspect.js:31:15
    at req_ (C:\xampp\htdocs\node_modules\natives\index.js:137:5)
    at require (C:\xampp\htdocs\node_modules\natives\index.js:110:12)
    at util.js:25:21
    at req_ (C:\xampp\htdocs\node_modules\natives\index.js:137:5)
    at require (C:\xampp\htdocs\node_modules\natives\index.js:110:12)
    at fs.js:42:21
    at req_ (C:\xampp\htdocs\node_modules\natives\index.js:137:5)
    at Object.req [as require] (C:\xampp\htdocs\node_modules\natives\index.js:54:10)
    at Object.<anonymous> (C:\xampp\htdocs\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:99)

I've read here that, in order to resolve the issue, I need to run this command:

npm install [email protected]

but this did not help resolve the issue.

Am I missing something else?

like image 806
Student22 Avatar asked Jan 30 '19 05:01

Student22


4 Answers

I ran into the same issue as you. To fix it, I added the following to my package.json in the devDependencies section

"natives": "^1.1.6"
like image 129
Lloyd Smith Avatar answered Nov 07 '22 23:11

Lloyd Smith


I had the same error after upgrading node to v10.16.0

I ran the following which solved my issue:

rm -rf node_modules
rm package-lock.json
npm cache clean --force
npm install 

After closer inspection, it would seem that the generated tree in package-lock was outdated.

like image 30
Codeheir Avatar answered Nov 07 '22 22:11

Codeheir


I also faced the same problem and then I fixed by the following command:

npm install [email protected]

May be helpful if someone having same issue. updating node to latest version requires above package.

like image 17
Dev-Learner Avatar answered Nov 07 '22 23:11

Dev-Learner


I recently ran into the same problem after installing node. Similar to @Dv-Learner answer, What fixed it for me was:

npm install [email protected]
npm rebuild node-sass

the bit about rebuild node-sass was required for my machine (Windows)

like image 6
EarlyCoder Avatar answered Nov 07 '22 22:11

EarlyCoder