-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Description
Error after importing the Channel
or Client
object from this library as seen in the screenshot below
Compiled with problems:X
ERROR in ./node_modules/@tf2pickup-org/mumble-client/dist/client.js 22:13-26
Module not found: Error: Can't resolve 'os' in 'D:\A.ing\Works\Others\Lacak-and-Valid\Exercises\React-Js\learn-mumble-client\node_modules\@tf2pickup-org\mumble-client\dist'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }
ERROR in ./node_modules/@tf2pickup-org/mumble-client/dist/tls-connect.js 12:30-44
Module not found: Error: Can't resolve 'tls' in 'D:\A.ing\Works\Others\Lacak-and-Valid\Exercises\React-Js\learn-mumble-client\node_modules\@tf2pickup-org\mumble-client\dist'
Steps to produce
- create a React JS app using the
npx create-react-app
command - enter the React Js app and install the
@tf2pickup-org/mumble-client
dependency by using thenpm i @tf2pickup-org/mumble-client
command - go to the
App.js
file and addimport { Channel, Client } from "@tf2pickup-org/mumble-client";
- run the React Js app by using the
npm start
command - the error appears
Environment
Framework: React Js 18.2.0
OS: Windows 11 and Monterey 12 (tested with both)
Node: Node: 14.21.2, 16.18.0, and 18.13.0 (switchable)
Metadata
Metadata
Assignees
Labels
No labels