samhirtarif / react-audio-recorder

An audio recording helper for React. Provides a component and a hook to help with audio recording.
https://www.npmjs.com/package/react-audio-voice-recorder
208 stars 62 forks source link

./node_modules\react-audio-voice-recorder\dist\index-1c988149.js Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime #128

Open ZakharovVladyslav opened 2 months ago

ZakharovVladyslav commented 2 months ago

Have been using this library for a month but yesterday unexpectedly faced following error:

Failed to compile.

./node_modules\react-audio-voice-recorder\dist\index-1c988149.js
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation

Import trace for requested module:
  ./node_modules\react-audio-voice-recorder\dist\index-1c988149.js
  ./node_modules\react-audio-voice-recorder\dist\react-audio-voice-recorder.es.js
  ./src\components\ui\voice-recorder\index.tsx
  ./src\components\ui\index.ts
  ./src\components\index.ts
  ./src\const\builder-by-type.ts
  ./src\const\index.ts
  ./src\middleware.ts

> Build failed because of webpack errors

./src/components/ui/voice-recorder/index.tsx:

'use client';

import * as React from 'react';
import { AudioRecorder } from 'react-audio-voice-recorder';

import s from './audio-recorder.module.scss';
import './audio-recorder-package.scss';

export const VoiceRecorder = () => {
   return (
      <section className={s.wrapper}>
         <AudioRecorder showVisualizer onRecordingComplete={() => {}} />
      </section>
   );
};

I tried to reinstall this package, tried to remove .next folder and build again but every time build crashes

codewarnab commented 5 days ago

same isssue