Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!