Consider adding `npm dedupe` to project upgrade instructions
See original GitHub issueWhen upgrading SPFx projects from one version to another, when you need to upgrade one or more npm packages, often you end up with a bunch of TS errors about duplicate incompatible types. I found out, that running npm dedupe after upgrading packages, solves this issue and prevents you from having to delete node_modules and the lock file. Should we consider adding npm dedupe to the set of upgrade instructions whenever we suggested upgrading one or more packages?
/cc: @baywet @wobba @VelinGeorgiev
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Consider adding `npm dedupe` to project upgrade instructions
I found out, that running npm dedupe after upgrading packages, solves this issue and prevents you from having to delete node_modules and the ......
Read more >npm-dedupe
To prefer deduplication over novelty during the installation process, run npm install --prefer-dedupe or npm config set prefer-dedupe true . Arguments are ...
Read more >Npm-dedupe, npm-deprecate and npm-dis-tag CLI options
This command deprecates a version of a package. This CLI command updates the npm registry entry for a package, providing a deprecation warning ......
Read more >How to update dependencies of dependencies using npm
The common solution is to put it to package.json within devDependencies or dependencies with ^1.2.2 . I don't want to put it into...
Read more >npm packages in the Package Registry - GitLab Docs
Replace @scope with the root level group of the project you're installing to the package from. · Replace your_domain_name with your domain name,...
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 Free
Top 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

Ideally, that would belong in the SPFx docs as it’s something that’s been coming up, and will be coming up in each SPFx version no matter if you’re creating a new project or upgrading an existing one.
If we did it as an optional step, how would that be handled with the shortened command that you’ve added recently @baywet?