-
Notifications
You must be signed in to change notification settings - Fork 184
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
Does not work in React project #131
Comments
I managed to solve it by adding a fallback for the path library ( First, install npm install -d customize-cra react-app-rewired path-browserify then create a const { override } = require("customize-cra");
module.exports = override((config, env) => {
// Add a fallback for the 'path' module, required for numjs dependency to work in the browser
config.resolve.fallback = {
path: require.resolve("path-browserify"),
};
return config;
}); Finally, modify the scripts section of the /* package.json */
"scripts": {
- "start": "react-scripts start",
+ "start": "react-app-rewired start",
- "build": "react-scripts build",
+ "build": "react-app-rewired build",
- "test": "react-scripts test",
+ "test": "react-app-rewired test",
"eject": "react-scripts eject"
} |
it is not a good idea
|
I'm trying to import the library, but it gives following error:
Is there any way to solve it?
The text was updated successfully, but these errors were encountered: