nodeバージョンが低すぎるため@babelプロファイルエラーが発生しました

879 ワード

以前のnodeインストールパッケージは菜鳥チュートリアルでダウンロードされたため、バージョンが低いため、npmを使用するとgulpコマンドタイムズ以下のエラーが発生します.
 
E:\bqc\html\game
ode_modules\@babel\core\lib\transformation\file\file.js:75 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. (E:\bqc\html\game
ode_modules\@babel\core\lib\index.js:147:36) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)

解決方法:公式サイトに行って最新バージョンをダウンロードして再インストールし、npm installを1回実行し、gulpを実行し、コンパイルに成功した.