Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda