Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./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 this issue Jul 25, 2024 · 0 comments
Assignees

Comments

@ZakharovVladyslav
Copy link

ZakharovVladyslav commented Jul 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants