-  
-   Notifications  You must be signed in to change notification settings 
- Fork 239
Closed
Description
Hello!
I upgraded to Create React App 5 recently, which newly uses Webpack 5.
Now Webpack 5 is not automagically doing polyfills for node modules anymore.
The errors are something like this (I cut out a lot of noise):
ERROR in ./node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers/http.js 3:13-28 Module not found: Error: Can't resolve 'http' in '/home/xxx/node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers' If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }' - install 'stream-http' ERROR in ./node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers/http.js 5:14-30 Module not found: Error: Can't resolve 'https' in '/home/xxx/node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers' If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }' - install 'https-browserify' Is it possible to make @apidevtools/json-schema-ref-parser work with browsers somehow?
Metadata
Metadata
Assignees
Labels
No labels