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.

Unable to resolve module `rxjs-compat/operators/map`

See original GitHub issue

Hi,

I’ve just updated to v0.20.0 and I encounter the following error:

error: Error: Unable to resolve module `rxjs-compat/operators/map` from `node_modules/@nozbe/with-observables/node_modules/rxjs/operators/map.js`: rxjs-compat/operators/map could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules: rm -rf node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*

What have I tried so far:

  • I have add in Podfile the following: pod 'React-jsi', :path => "../node_modules/react-native/ReactCommon/jsi", :modular_headers => true pod 'WatermelonDB', :path => '../node_modules/@nozbe/watermelondb' and ran again pod install
  • I have cleared the cache using the following commands: watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro* && rm -rf $TMPDIR/haste-* rm -rf ~/.rncache rm -rf ~/Library/Caches/com.facebook.ReactNativeBuild rm -rf ~/Library/Developer/Xcode/DerivedData/* rm -rf ~/Library/Caches/CocoaPod
  • I have removed node_modules and installed the dependencies again

Do you know what might be the issue?

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Mohamed-kassimcommented, Oct 19, 2020

Error: Unable to resolve module rxjs-compat/observable/from from node_modules/rxjs/observable/from.js: rxjs-compat/observable/from could not be found within the project.

this one still exists until now @radex

2reactions
radexcommented, Oct 13, 2020

Yeah, the error message says it all:

error: Error: Unable to resolve module `rxjs-compat/operators/map` from `node_modules/@nozbe/with-observables/node_modules/rxjs/operators/map.js`: rxjs-compat/operators/map could not be found within the project.

the problem is with withObservables which is still misconfigured and doesn’t explicitly have rxjs-compat as a dependency. I’d appreciate a quick PR fixing the imports there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'rxjs-compat/Observable' - Stack Overflow
Cannot find module 'rxjs-compat/Observable' ; Have you accidentally left any import statements in your code referencing the rxjs-compat package?
Read more >
Cannot find module 'rxjs-compat/Observable' error | bobbyhadz
To solve the error "Cannot find module 'rxjs-compat/Observable'", make sure to install the package by opening your terminal in your project's root directory...
Read more >
Cannot find module 'rxjs/operators/map' when running any ng ...
Getting the following error when trying to run any ng commands. `ng --version module.js:471 throw err; ^ Error: Cannot find module ...
Read more >
error: cannot find module 'rxjs' - You.com | The AI Search ...
Try setting the "moduleResolution": "node" inside your compileOptions to specify module resolution strategy for TS. ... import { Observable } from 'rxjs/Rx';.
Read more >
rxjs - npm
If you're using RxJS version below 7.2, you can pull in any operator you need from one spot, under 'rxjs/operators' . import {...
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