Module not found: Error: Package path ./index is not exported from package node_modules/rxjs (see exports field in /node_modules/rxjs/package.json)
Module not found: Error: Package path ./index is not exported from package node_modules/rxjs (see exports field in /node_modules/rxjs/package.json)
我正在 RxJs7
我的 angular 12.2.0 项目中尝试,似乎 rxjs 运算符和方法的路径发生了变化。
我收到以下错误
./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)
请注意,上述错误来自使用 rxjs7
的库
在您的代码中,替换
import { Whatever } from 'rxjs/index'
来自
import { Whatever } from 'rxjs'
rxjs/index 文件夹已从 rxjs 中删除。
我正在 RxJs7
我的 angular 12.2.0 项目中尝试,似乎 rxjs 运算符和方法的路径发生了变化。
我收到以下错误
./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)
请注意,上述错误来自使用 rxjs7
的库在您的代码中,替换
import { Whatever } from 'rxjs/index'
来自
import { Whatever } from 'rxjs'
rxjs/index 文件夹已从 rxjs 中删除。