brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 285 forks source link

internalBinding #238

Open icetee opened 5 years ago

icetee commented 5 years ago

I use Node v11.3.0 and I get error message, after load webshot package. Previous node version was good.

npm: 6.4.1 os: MacOS 10.13.6

fs.js:25
'use strict';
^

ReferenceError: internalBinding is not defined
    at fs.js:25:1
    at req_ (/Users/###/node_modules/natives/index.js:137:5)
    at Object.req [as require] (/Users/###/node_modules/natives/index.js:54:10)
    at Object.<anonymous> (/Users/###/node_modules/graceful-fs/fs.js:1:99)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ##@1.1.0 start: `node main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ##@1.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
lkgoerges commented 5 years ago

Hey,

I solved the issue by running npm update --depth=9999 alternatively cd into /node_modules/webshot/ and run npm i graceful-fs@3.0.11

This fixed the "internalBinding is not defined" reference error for me.