Solucionado (ver solução)
Solucionado
(ver solução)
5
respostas

Environment key "es2020" is unknown

eae pessoal !

Estou tendo o seguinte erro quando tento rodar o projeto da aula... Alguém tem uma sugestão de como resolver ?

OS -> Fedora 34

----- log ----

> projeto@0.1.0 serve
> vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                                                                                9:32:36 PM

Module build failed (from ./node_modules/eslint-loader/index.js):
Error: /home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/.eslintrc.js:
    Environment key "es2020" is unknown

    at /home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config/config-validator.js:158:19
    at Array.forEach (<anonymous>)
    at validateEnvironment (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config/config-validator.js:154:30)
    at Object.validate (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config/config-validator.js:263:5)
    at loadFromDisk (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config/config-file.js:544:19)
    at Object.load (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config/config-file.js:587:20)
    at Config.getLocalConfigHierarchy (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:240:44)
    at Config.getConfigHierarchy (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:192:43)
    at Config.getConfigVector (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:299:21)
    at Config.getConfig (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:342:29)
    at processText (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/cli-engine.js:181:33)
    at CLIEngine.executeOnText (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/cli-engine.js:690:40)
    at lint (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint-loader/index.js:278:17)
    at transform (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint-loader/index.js:252:18)
    at /home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/loader-fs-cache/index.js:127:18
    at ReadFileContext.callback (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/loader-fs-cache/index.js:31:14)

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
5 respostas

Rafael, qual versão do Node você tem instalada?

Opa, estou usando a v12.22.6

Bacana... consegue fazer um teste?

Tenta fazer update pra versão LTS?

Aqui explica como instalar a maior versão disponível.

Depois do update, experimenta excluir a node_modules e rodar um npm install novamente ;)

Marcos,

Eu já havia reinstalado o Node, já fiz de tudo hehe

Agora peguei o projeto da primeira aula e refiz a instalação, voltei pro erro original Error: No ESLint configuration found.

segue o log:

@fedora vue-frontend]$ npm run serve

> projeto@0.1.0 serve
> vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                           8:34:36 PM

Module build failed (from ./node_modules/eslint-loader/index.js):
Error: No ESLint configuration found.
    at Config.getLocalConfigHierarchy (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:268:39)
    at Config.getConfigHierarchy (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:192:43)
    at Config.getConfigVector (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:299:21)
    at Config.getConfig (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/config.js:342:29)
    at processText (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/cli-engine.js:181:33)
    at CLIEngine.executeOnText (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint/lib/cli-engine.js:690:40)
    at lint (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint-loader/index.js:278:17)
    at transform (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/eslint-loader/index.js:252:18)
    at /home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/loader-fs-cache/index.js:127:18
    at ReadFileContext.callback (/home/rafaelm/github/vuejs-access-control/vue-controle-users-nobo/vue-frontend/node_modules/loader-fs-cache/index.js:31:14)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13)

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
solução!

Só teve uma forma de corrigir ... Instalando o bom e velho Ubuntu rsrs