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

310
Visualizações
VSCode Randomly popping this error up everywhere, not resolving until I reload the workspace

Everywhere something expects brackets, and a few other places, I have been finding this error:

Parse error on line 1:
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', "[", got ':(sometimes this : is different here)'

I have to reload my window to fix this every time, and I have no idea where this bug comes from. I've found it everywhere:

/*CSS*/
:root{
~ /* This is where the error appears, where the tilde is.*/
    --bg-color:white;
    --popup-bg:whitesmoke;
}
//Javascript
const interface = { ...
~ //Right here

It also appears in JSON, only when I edit it though. I first noticed it in my TSConfig.json files, and then it started popping up (almost)every time there's brackets.

Please help!

EDIT: This is my workspace:

build/index.js:

var test = {
    error: false,
    name: "Someone",
    age: 10,
    appearance: {
        face: "red"
    }
};

./index.ts:

var test = {
    error:false,
    name:"Someone",
    age:10,
    appearance:{
        face:"red"
    }
}

./package.json:

{
  "name": "apijs",
  "version": "1.0.0",
  "description": "",
  "main": "build/index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

./tsconfig.json:

{
    "compilerOptions": {
        "watch": true,
        "outDir": "build/"
    }
    ~
}
~

Steps to reproduce:

  1. New VSCode Workspace
  2. Create index.ts as follows
  3. Create tsconfig.json as follows
  4. run tsc
  5. Modify tsconfig.json.

After disabling all extensions the bug seems to have disappeared completely.

I individually tested ESLint and JSON extensions, with no luck. The bug is probably in one of my extensions.

Another edit: After re-enabling my extensions I removed the test typescript code and immediately got 2 errors in the same place at the beginning of my file.

about 4 years ago · Juan Pablo Isaza
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