gulp报错internalBinding is not defined

2019-04-23235次阅读gulp

gulp报错代码如下:

internal/util/inspect.js:31
const types = internalBinding('types');
              ^

ReferenceError: internalBinding is not defined
    at internal/util/inspect.js:31:15
    at req_ (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\natives\index.js:137:5)
    at require (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\natives\index.js:110:12)
    at util.js:25:21
    at req_ (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\natives\index.js:137:5)
    at require (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\natives\index.js:110:12)
    at fs.js:42:21
    at req_ (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\natives\index.js:137:5)
    at Object.req [as require] (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\natives\index.js:54:10)
    at Object.<anonymous> (F:\mobilegames\blmn_180731\act\notice\wap190419\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:99)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wap@1.0.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wap@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\2144\AppData\Roaming\npm-cache\_logs\2019-04-23T08_08_49_051Z-debug.log

问题原因

问题可能是node版本升级或npm升级造成的,node版本8+好像没有出现这个问题。

解决方案

npm install natives@1.1.6

下载成功后得到解决。

建议还是gulp4构建任务实例吧,新版本的任务构建肯定会快很多。

 

上一篇: js大小写转换  下一篇: JavaScript设计模式之单例模式  

gulp报错internalBinding is not defined相关文章