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

210
Visualizações
Problems with importing libraries into typescript .ts files and cors errors

I am trying to build a fairly simple html canvas game in typescript, and for that I plan to use the Konva library. I can easily import it into my html file with <script src="... which should allow my program to run. But since the typescript is in a separate folder I need to import it separately in order to not cause errors and to use suggestions in vscode. Using import requires that when connected to an html file it has type="module", and even though all of these files are in a folder together on my desktop, importing a js file that is a module causes CORS errors.

Is there any other way to do any of this? Every answer I seem to find requires creating a local http webserver, and that really seems like way to much effort for a coding an html canvas game.

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

0

npm install konva

in vs code is one way

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