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

428
Views
How to fix the Cannot find module mp3 file or its corresponding type declarations

enter image description here

How to fix the error Cannot find module './audio/audio1.mp3' or its corresponding type declarations. also already use the require('./audio/audio1.mp3') and also getting an error.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Inside the src/react-app-env.d.ts add this:

/// <reference types="react-scripts" />
    declare module '*.mp3'; // '*.wav' if you're using wav format

Now you can use it like this:

import audio1 from './audio/audio.mp3';

const myAudio = new Audio(audio1);
about 4 years ago · Juan Pablo Isaza 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!