Module not found: Error: Package path ./index is not exported from package node_modules/rxjs (see exports field in /node_modules/rxjs/package.json)
Asked Answered
A

1

5

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

Atkins answered 7/8, 2021 at 17:39 Comment(0)
A
11

In your code, replace

import { Whatever } from 'rxjs/index'

by

import { Whatever } from 'rxjs'

The rxjs/index folder was removed from rxjs.

Angelika answered 7/2, 2022 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.