Skip to content

Fix React 18 compatibility and audio issues in browser example#90

Open
vikasharma005 wants to merge 76 commits into
ccoreilly:masterfrom
vikasharma005:fix-react18-audio-issues
Open

Fix React 18 compatibility and audio issues in browser example#90
vikasharma005 wants to merge 76 commits into
ccoreilly:masterfrom
vikasharma005:fix-react18-audio-issues

Conversation

@vikasharma005

Copy link
Copy Markdown

This pull request includes several important fixes for the React example:

Changes Made

  1. React 18 Compatibility: Updated ReactDOM.render to createRoot API
  2. Node.js Polyfills: Added process.env and process.nextTick polyfills for browser environment
  3. Webpack 5 Configuration: Added config-overrides.js with buffer polyfill
  4. Build Process: Updated package.json to use react-app-rewired
  5. Import Structure: Fixed import order and removed duplicates
  6. Preflight Checks: Added .env with SKIP_PREFLIGHT_CHECK=true

Issues Fixed

  • React 18 deprecation warnings
  • 'process is not defined' errors
  • 'process.nextTick is not a function' errors
  • Page crashes when using microphone
  • Import errors during build

The app now builds and runs successfully with all audio features working.

ccoreilly and others added 30 commits February 23, 2021 23:22
Vosk 0.3.30, SetWords support, acceptWaveform with "raw" float buffer
- Emscripten 2.0.29
- OpenFST 1.8.0
ccoreilly and others added 29 commits November 5, 2021 23:00
Allow subscribing to recognizer error events
Improve recognizer event listener handling
Zlib v.1.2.11 is no longer available by the specified link. The latest v 1.2.12 works just as fine (I tested the whole build).
Fixed zlib link for the latest version
* except react-scripts, version ^5.0.0  leads to errors due to a missing "buffer" polyfill (react/create-react-app#11756)
This commit includes several important fixes for the React example:

1. React 18 Compatibility: Updated ReactDOM.render to createRoot API
2. Node.js Polyfills: Added process.env and process.nextTick polyfills
3. Fixed import structure to resolve ESLint errors
4. Ensured audio processing works correctly in browser environment

These changes fix the following issues:
- React 18 deprecation warnings
- 'process is not defined' errors
- 'process.nextTick is not a function' errors
- Page crashes when using microphone
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

Successfully merging this pull request may close these issues.

7 participants