I create a new project with npx create-react-app my-app, then I install npm i @stoplight/json-schema-viewer, and use it in the App.js providing a valid json schema:
When I run npm start to start the project, I get such errors:
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: { "buffer": require.resolve("buffer/") }'
- install 'buffer'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "buffer": false }
Maybe I'm doing something wrong, but maybe there's a bug.
Context
Cannot use the library.
Current Behavior
An error about polyfills when npm start.
Expected Behavior
I guess there shouldn't be an error when starting a project.
I create a new project with
npx create-react-app my-app
, then I installnpm i @stoplight/json-schema-viewer
, and use it in theApp.js
providing a valid jsonschema
:When I run
npm start
to start the project, I get such errors:Maybe I'm doing something wrong, but maybe there's a bug.
Context
Cannot use the library.
Current Behavior
An error about polyfills when
npm start
.Expected Behavior
I guess there shouldn't be an error when starting a project.
Possible Workaround/Solution
Steps to Reproduce
In the description.
Environment
create-react-app
(5)