Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

547
Visualizações
Sanity Studio: Parsing Error for Babel Preset Env

I'm new to working with Sanity, and just set up a project. Everything is working fine, however, in Visual Studio Code, I keep getting a parsing error that won't disappear, and I'm wondering how I can fix it.

Parsing error: Cannot find module '@babel/preset-env'

I've tried deleting the node_modules and re-running sanity install, I've also tried using npm install to install @babel/core and @babel/preset-env. Nothing seems to have fixed the problem so far.

Any suggestions? I want to start using Sanity with my team at work, but having this error is really quite annoying (as everything is underlined in red).

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I was having a similar issue. For me, the issue was related to the way VS Code deals with a project containing multiple ESLint working directories (common in monorepos).

For example

Project
   |--- /web
   |--- /studio

In my project root, edit (or create) ./.vscode/settings.json to include my ESLint projects. NB: these settings only apply to your current workspace.

"eslint.workingDirectories": ["./web", "./studio"]

Hope that helps :-)

about 4 years ago · Juan Pablo Isaza Relatório

0

Method 1:

Create a file called .babelrc in your root directory and add this code

    {
      "presets": ["next/babel"],
      "plugins": []
    }

And in .eslintrc replace the existing code with

    {
      "extends": ["next/babel"]
    }

Method 2:

You need to install npm with this command:

npm install --save-dev @babel/core @babel/preset-env

         or


npm install --save-dev @babel/core

I hope this will solve your problem.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda