Quick Fixes for Common Problems
See original GitHub issueMultiple Versions of RxJS or WebPack
Having multiple versions of RxJS or WebPack in your node_modules
can result in hard-to-troubleshoot problems. Example: https://github.com/nrwl/nx/issues/2421.
If you are using the Nx command (e.g., you invoke nx build myproj
), even when Nx simply delegates to the Angular CLI, we try to work around the issues, but it’s not a 100% guarantee that they won’t appear. The only guarantee is to have one version of RxJS in node_modules
.
- Make sure your
package.json
depends on the same version as@nrwl/workspace
. - If it didn’t help:
2a: If you are using yarn, add the following to your
package.json
:
"resolutions": {
"rxjs": "6.4.0" // set to whatever version you want
}
2b: if you are using npm, add the following to your package.json
:
"resolutions": {
"rxjs": "6.4.0" // set to whatever version you want
}
and the following to your devDepencecies
:
"npm-force-resolutions": "0.0.3"
And add the following postinstall script:
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:6 (4 by maintainers)
Top Results From Across the Web
15 Quick Fixes for Common Home Problems - HGTV
Give Your Toilet Flush More Gush · Keep the Heat on Exposed Indoor Pipes During Cold Weather · Banish Musty Front-Load Washer Smells...
Read more >27 Instant Fixes For Nagging Problems Around the House
Super-simple solutions for common household headaches. · Cleaner Clothes · Stop Washing Machine Walk · If the A/C Isn't Working · Appliance Touch-Up ......
Read more >5 Simple Fixes for Most Computer Problems - Lifewire
Try these five easy fixes for most computer problems before you pay for ... Often times, virus-caused problems appear as general computer ...
Read more >5 Fast-Fixes For Common Health Problems | realbuzz.com
5 Fast-Fixes For Common Health Problems ; 1. Bloating ; 2. Anxiety ; 3. Hay fever ; 4. Dandruff ; 5. Insomnia.
Read more >11 Easy DIY Fixes for Annoying House Problems - Bob Vila
11 Easy DIY Fixes for Annoying House Problems · Rapid Repairs · Running Toilet · Damaged Screens · Filling In Picture Holes ·...
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
@wrslatz The problem is not related to RxJS directly but how NPM/Yarn resolves multiple versions of the same installed package, you can find more details here.
Thanks @edbzn! That makes sense from the npm side. I wonder why we run into so many issues with
rxjs
specifically though (we usually hittsc
compile errors where the types of the two different versions mismatch for the same object, likeObservable
).Maybe it has to do with how complex the types in
rxjs
are. Besides forcing module resolutions, are there any recommended best practices to keep a library you maintain compatible with multiplerxjs
versions? Not sure ifdepenencies
vspeerDependencies
forrxjs
and semver specificity matter.