microsoft/TypeScript-Handbook

Babelify requires Babel 7.x (@babel/core) in Tutorial > Gulp page

dzeyelid opened this issue · 0 comments

How to include Babel into Gulp on the Tutorial > gulp page is old. An error occurred in the instruction.

proj/node_modules/babelify/index.js:16
  throw err;
  ^

Error: Cannot find module '@babel/core'
 babelify@10 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babelify@8'.
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (proj/node_modules/babelify/index.js:9:11)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

So I suggest updating the package installation to using @babel/core instead of babel-core. Or downgrade Babelify to 8.x.