Quando dou o comando "npm run build" ele da um erro e não estou conseguindo identificar o problema...
apareceu um "package-lock.json" na pasta tambem, que não aparece no vide,o, mas com ou sem ele ainda não funciona.
no ".babelrc" está:
{
"presets" : ["es2015"]
}
no ''packge.json'' esta:
{
"name": "client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "babel js/app-es6 -d js/app"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.10.1"
}
}
Log do erro:
$ npm run build
client@1.0.0 build C:\Users\Eric\Desktop\javascript\aluraframe\client babel js/app-es6 -d js/app
Error: Couldn't find preset "es2015" relative to directory "C:\Users\Eric\Desktop\javascript\aluraframe\client"
at C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:293:19
at Array.map ()
at OptionManager.resolvePresets (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20)
at OptionManager.mergePresets (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10)
at OptionManager.mergeOptions (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:249:14)
at OptionManager.init (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\index.js:212:65)
at new File (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\file\index.js:135:24)
at Pipeline.transform (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
at transform (C:\Users\Eric\Desktop\javascript\aluraframe\client\node_modules\babel-cli\lib\babel\util.js:52:22)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@1.0.0 build: babel js/app-es6 -d js/app
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Eric\AppData\Roaming\npm-cache_logs\2020-04-22T20_35_25_583Z-debug.log
Alguma sugestão para conseguir rodar o Babel?