Gulp 吞咽解析失败

Gulp 吞咽解析失败,gulp,babeljs,Gulp,Babeljs,当我运行命令时: gulp build 我得到一个错误: [13:28:52] Requiring external module babel-register node_modules/nan resolve failed for "caniuse-db": Error: Cannot find module 'caniuse-db' resolve failed for "babel-runtime": Error: Cannot find module 'babel-runtime'

当我运行命令时:

gulp build
我得到一个错误:

[13:28:52] Requiring external module babel-register
node_modules/nan
resolve failed for "caniuse-db": Error: Cannot find module 'caniuse-db'
resolve failed for "babel-runtime": Error: Cannot find module 'babel-runtime'
这似乎是在我将我的
.babelrc
中的预设从
es2015
更改为
es2015 loose

之后发生的,上面的堆栈轨迹似乎与您的非常相似。。。他们通过使用
loose
选项从
es2015 loose
预设切换到
es2015
预设解决了问题:

["es2015", { "loose": true }]
上面的痕迹看起来和你的很相似。。。他们通过使用
loose
选项从
es2015 loose
预设切换到
es2015
预设解决了问题:

["es2015", { "loose": true }]

当我这样做时,我会得到另一个错误:
ReferenceError:[BABEL]gulpfile.BABEL.js:使用删除的BABEL 5选项:base.loose-为您正在使用的相关插件指定
loose`选项或使用设置该选项的预设。`当我这样做时,我会得到另一个错误:
ReferenceError:[BABEL]gulpfile.babel.js:Using removed babel 5 option:base.loose-为正在使用的相关插件指定
loose`选项,或使用设置该选项的预设`