3

I am trying RxJs7 in my angular 12.2.0 project and it seems like the path of rxjs operator and method changed.

I am getting the below error

./dist/candypal/website/fesm2015/candypal-website.js:8:0-50 - Error: Module not found: Error: Package path ./index is not exported from package /Users/aniruddh/aniruddh/develop/experiment/candypal/node_modules/rxjs (see exports field in /Users/aniruddh/aniruddh/develop/experiment/candypal/node_modules/rxjs/package.json)

Note that the above error is coming from a library that uses rxjs7

Aniruddha Das
  • 20,520
  • 23
  • 96
  • 132

1 Answers1

6

In your code, replace

import { Whatever } from 'rxjs/index'

by

import { Whatever } from 'rxjs'

The rxjs/index folder was removed from rxjs.

Olivier Tonglet
  • 3,312
  • 24
  • 40