Webpack version inconsistency after `npm update`
See original GitHub issueBefore you start - checklist
- I followed instructions in documentation written for my React-PDF version
- I have checked if this bug is not already reported
- I have checked if an issue is not listed in Known issues
- If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
Whenever I run an npm update
command to update other packages and after that I try an npm run start
or npm run build
I get following error message:
The only way I currently found to fix this is to manually remove the node_modules
folder and delete the package-lock.json
file, uninstall react-pdf
, run a clean npm install
and only afterwards run once more npm i react-pdf
. How can I fix this?
Steps to reproduce
- Install latest version
- Downgrade another package
- Run
npm update
- Run
npm run start
ornpm run build
Expected behavior
Should not have webpack inconsistency
Actual behavior
Additional information
No response
Environment
- **Browser (if applicable)**: Version 98.0.4758.9 (Official Build) dev (arm64)
- **React-PDF version**: 5.6.0
- **React version**: 17.0.1
- **Webpack version (if applicable)**:
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
After upgrading npm, webpack errors showing - Stack Overflow
After I upgraded the npm package to the latest one, 8.2. 0 I started getting problems in react application. here is the screen...
Read more >How I solved and debugged my Webpack issue through trial ...
My debugging journey started with the following setup: webpack.config.js // webpack v4.6.0 ... npm install webpack-serve --save-dev.
Read more >webworkify-webpack - npm
webworkify-webpack. Generates a web worker at runtime from webpack's bundled modules with only the used dependencies.
Read more >How to Use Semantic Versioning in NPM | heynode.com
If a version of a package is tagged in package.json to ^2.0.0 , and the latest version is 2.88.0 , version 2.88.0 will...
Read more >Using webpack with TypeScript - LogRocket Blog
We'll also explore how to use webpack plugins. To follow along with this tutorial, you'll need the following: npm; Node.js: If you already...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note that peerDependencies are now installed by default in npm7+, so probably we also should mark the dependency as optional: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependenciesmeta
Ah i see I was using
entry.webpack
instead ofentry.webpack5
. Thanks all working now 😃