question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue on react-scripts@5.0.0, react@18.0.0

See original GitHub issue

Describe the bug Since I am using create-react-app, I needed to use react-app-rewired to configure my webpack.config. This is what my config-overrides.js looks like:

const webpack = require('webpack');

module.exports = function override(config, env) {
	config.plugins = [
		new webpack.ProvidePlugin({
			Buffer: ['buffer', 'Buffer'],
			process: 'process/browser',
		}),
	];
	config.resolve.fallback = {
		process: require.resolve('process/browser'),
		zlib: require.resolve('browserify-zlib'),
		stream: require.resolve('stream-browserify'),
		util: require.resolve('util'),
		buffer: require.resolve('buffer'),
		asset: require.resolve('assert'),
	};

	return config;
};

Whenever I put this code

config.plugins = [
    new webpack.ProvidePlugin({
	    Buffer: ['buffer', 'Buffer'],
	    process: 'process/browser',
    }),
];

on the webpack.config and start the server, it produces this error on the terminal URIError: Failed to decode param '/%PUBLIC_URL%/manifest.json'. I tried removing the %PUBLIC_URL% and it just gives me white screen with no errors.

Screenshots image image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Brave
  • React-pdf version: 2.1.1

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
boyboi86commented, May 3, 2022

Hi, any updates? React 18 is it compatible ?

3reactions
boyboi86commented, Apr 22, 2022

Ok, it may not be helpful but… u need to put in alias…

    alias: {
      zlib: require.resolve("browserify-zlib"),
      stream: require.resolve("stream-browserify")
    },

Regardless, it will still give error when complied.

Any updates/ solution any1? Cause I just started a new project in react 18

I can’t even perform npm install


npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sb-private-webapp-client@0.1.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.6 || ^17.0.0" from @react-pdf/renderer@2.1.1
npm ERR! node_modules/@react-pdf/renderer
npm ERR!   @react-pdf/renderer@"^2.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!

Read more comments on GitHub >

github_iconTop Results From Across the Web

create-react-app dependency version issues with React 18
Found: react@18.0.0 npm ERR! node_modules/react npm ERR! react@"^18.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: ...
Read more >
Versions - React
React Versions. A complete release history for React is available on GitHub. Changelogs for recent releases can also be found below.
Read more >
[Solved] react-scripts: command not found - ItsJavaScript
The react-scripts: command not found error mainly occurs if the dependencies are not installed or if the react-scripts is not installed.
Read more >
React Project causing npm ERR! code ERESOLVE while ...
The error is a peer dependency conflict relating to versions of react, which provides guidance on how you can attempt to resolve it:...
Read more >
Which changes are necessary for upgrading to React 18 and ...
you issue is updating http-proxy-middleware to version 2. devserver (web pack) is built with version 0 and the configuration scripts match ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found