A
A
Alexander2017-04-18 20:47:26
Node.js
Alexander, 2017-04-18 20:47:26

Why doesn't babel-node work?

I am learning from one tutorial from a year ago, there is ES6 code in the code, namely import.
this is fixed by installing babel into the project and running from npm with the babel-node server/app.js command.
As I understand it, this translates es6 into es5 syntax and glues modules, but it just displays No such file or directory in the console. Is the
command obsolete? what can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Feninets, 2017-04-19
@aleksand44

babel-node has been depried.
use babel-cli instead
https://babeljs.io/docs/usage/cli/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question