quick question. Found similar cases but they dont worked for me.
Following this guide I´m trying to install Babel Cli.
but running babel from a mand in package.json configured like
"scripts": {
"build": "babel src -d lib"
},
throwing an error
> babel src -d lib
src doesn't exist
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `babel src -d lib`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A plete log of this run can be found in:
when running the mand npm run build
I´ve already installed babel-preset-env
and configured a .babelrc
npm version 6.1.0
Do you know where src doesn't exist
es from ?
Thanks!
quick question. Found similar cases but they dont worked for me.
Following this guide https://babeljs.io/docs/setup/#installation I´m trying to install Babel Cli.
but running babel from a mand in package.json configured like
"scripts": {
"build": "babel src -d lib"
},
throwing an error
> babel src -d lib
src doesn't exist
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `babel src -d lib`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A plete log of this run can be found in:
when running the mand npm run build
I´ve already installed babel-preset-env
and configured a .babelrc
npm version 6.1.0
Do you know where src doesn't exist
es from ?
Thanks!
1 Answer
Reset to default 8src
is the folder that contains the files you want to transform. Either create it and move your files there or update the mand to use the folder that contains your files.
More info: https://babeljs.io/docs/usage/cli/#pile-directories