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

160
Visualizações
How to use an existing JS file in a vue project

I need to use this JS file in my vue3 project.

https://gist.github.com/imolorhe/b31f95e1548ad7d1b233de26267fe21c#file-jungle-js

My JS library is

import { Jungle } from "./jungle.js";

async pitchTransform(
    audioBuffer,
    pitchMod 
  ) {
    let ctx = new OfflineAudioContext(
      audioBuffer.numberOfChannels,
      audioBuffer.length,
      audioBuffer.sampleRate
    );

    let source = ctx.createBufferSource();
    source.buffer = audioBuffer;

    let pitchChangeEffect = new Jungle(ctx);
}

The application shows this error:

Uncaught SyntaxError: The requested module '/src/js/jungle.js?t=1659194585032' does not provide an export named 'Jungle' (at voiceTransform.js?t=1659199164108:1:10)

What's the recommend way to include and use jungle.js in this setup?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

As the error is saying, that file has no export named "Jungle". In fact it has none.

You have to export that function manually, by editing that file and appending an export keyword:

// ...

export function Jungle(context) {

// ...
about 4 years ago · Santiago Trujillo 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