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

295
Visualizações
I'm having trouble with a jszip configuration

I'm trying to hook up jszip to my Flask/python project running in VS on windows, but JS crashes as soon as I try to import jszip or declare an instance with the 'var JSZip = require("jszip");' call. I've tried both downloading and extracting the zip installer as well as installing with npm. Npm installs with success and node is in the path. The npm seem to create a folder within the 'static' called 'node_modules\jszip' while i've unzipped the one I downloaded to 'scripts\jszip'. When I either add the 'import' declaration or the 'var JSZip = require("jszip");' line, the js function crashes. Same if I only call the top folder 'import JSZip from 'node_modules/jszip'. Without the 'import' nor the 'require' call, the Alert displays. I'm a new to js modules, so it's probably a very basic error but I just cannot spot it. Any help appreciated :-)

import JSZip from 'node_modules/jszip/dist/jszip.js';

function download_zip(arrUrls) {
    alert("1");
    var JSZip = require("jszip");
}
about 4 years ago · Santiago Gelvez
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