[英]'gulp-babel' not working in node js version 4
當我的 gulp 文件中需要 gulp gulp-babel
以在我的 js 文件中使用es6
語法時,我遇到了錯誤。
/home/logakrishnan/Documents/project/node_modules/@babel/core/lib/transformation/file/file.js:77
constructor(options, {
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/logakrishnan/Documents/project/node_modules/@babel/core/lib/index.js:153:36)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
節點版本: v4.4.7
您必須升級 Node.js 版本。 (節點 4 來自 2016 年,在 JavaScript 術語中相對永恆。)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.