Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ecmascript 6 babel5-->;babel6:模块属性_Ecmascript 6_Babeljs - Fatal编程技术网

Ecmascript 6 babel5-->;babel6:模块属性

Ecmascript 6 babel5-->;babel6:模块属性,ecmascript-6,babeljs,Ecmascript 6,Babeljs,我试图弄明白如何告诉babel6生成一个特定的模块语法(amd、commonjs等) 这是我用来指定模块的方式: babel6给了我一个错误:Unknow选项:base.modules 感谢您的指导!!:) 错误: events.js:141 throw er; // Unhandled 'error' event ^ ReferenceError: [BABEL] C:\a\au\metadata\dist\aurelia-metadata.js: Unknown o

我试图弄明白如何告诉babel6生成一个特定的模块语法(amd、commonjs等)

这是我用来指定模块的方式:

babel6给了我一个错误:
Unknow选项:base.modules

感谢您的指导!!:)


错误:

events.js:141
      throw er; // Unhandled 'error' event
      ^
ReferenceError: [BABEL] C:\a\au\metadata\dist\aurelia-metadata.js: Unknown option: base.modules
    at Logger.error (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\logger.js:41:11)
    at OptionManager.mergeOptions (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\options\option-manager.js:262:18)
    at OptionManager.init (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\options\option-manager.js:416:10)
    at File.initOptions (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\index.js:191:75)
    at new File (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\index.js:122:22)
    at Pipeline.transform (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\pipeline.js:42:16)
    at DestroyableTransform._transform (C:\a\au\metadata\node_modules\gulp-babel\index.js:32:20)
    at DestroyableTransform.Transform._read (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:10)
    at DestroyableTransform.Transform._write (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:160:12)
    at doWrite (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:335:12)
    at writeOrBuffer (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:321:5)
    at DestroyableTransform.Writable.write (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:248:11)
    at write (C:\a\au\metadata\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:623:24)
    at flow (C:\a\au\metadata\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:632:7)
    at DestroyableTransform.pipeOnReadable (C:\a\au\metadata\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:664:5)
    at emitNone (events.js:67:13)
从@thedark1337英寸开始:

对于babel 6,您需要使用插件


此外,如果您还没有,那么如果您正在使用aurelia框架进行开发,您还需要babel-preset-es2015将es2015传输到ES5。使用非常兼容的typescript hi@Venkatraman-我正在将aurelia构建过程升级为使用babel5中的babel6。这是如何从ES7源代码生成aurelia.d.ts文件的。我100%同意你的打字脚本:):)更新babeljs中的准确和完整错误,继续进行进一步的REPO(分支)在这里:
npm安装
然后
gulp构建
复制错误
events.js:141
      throw er; // Unhandled 'error' event
      ^
ReferenceError: [BABEL] C:\a\au\metadata\dist\aurelia-metadata.js: Unknown option: base.modules
    at Logger.error (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\logger.js:41:11)
    at OptionManager.mergeOptions (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\options\option-manager.js:262:18)
    at OptionManager.init (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\options\option-manager.js:416:10)
    at File.initOptions (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\index.js:191:75)
    at new File (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\file\index.js:122:22)
    at Pipeline.transform (C:\a\au\metadata\node_modules\gulp-babel\node_modules\babel-core\lib\transformation\pipeline.js:42:16)
    at DestroyableTransform._transform (C:\a\au\metadata\node_modules\gulp-babel\index.js:32:20)
    at DestroyableTransform.Transform._read (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:10)
    at DestroyableTransform.Transform._write (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:160:12)
    at doWrite (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:335:12)
    at writeOrBuffer (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:321:5)
    at DestroyableTransform.Writable.write (C:\a\au\metadata\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:248:11)
    at write (C:\a\au\metadata\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:623:24)
    at flow (C:\a\au\metadata\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:632:7)
    at DestroyableTransform.pipeOnReadable (C:\a\au\metadata\node_modules\gulp\node_modules\vinyl-fs\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:664:5)
    at emitNone (events.js:67:13)