E:\JM\NodeJs\es6-mkYuan\gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import requireDir
from 'require-dir';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Liftoff.handleArguments (e:\JM\NodeJs\node_global\node_modules\gulp\bin\g
ulp.js:116:3)
源码就是慕课网上的
(function (exports, require, module, __filename, __dirname) { import requireDir
from 'require-dir';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:537:28)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Liftoff.handleArguments (C:\Users\Administrator\AppData\Roaming\npm\node_
modules\gulp\bin\gulp.js:116:3)
和这个一样的 .babelrc文件也有 里面也有配置es2015呀