gpt4 book ai didi

angular6 - 错误 : rxjs/operator/map has no exported member 'map'

转载 作者:行者123 更新时间:2023-12-04 14:08:38 27 4
gpt4 key购买 nike

我正在从 angular 5 迁移到 angular 6。当我进行 npm run build 时,我会向控制台抛出以下错误:

error TS2305: Module '"C:/PrjNET/Elevation3/FW/4.00/Mainline/Framework/Development/Client/ElevationJS/ngcore/.tmp/node_modules/rxjs/operator/map"' has no exported member 'map'.



我正在进口 map如下:
import { map} from 'rxjs/operator/map';

有谁知道如何解决这个问题?

最佳答案

只需要从这里更改导入:

import { map } from 'rxjs/operator/map';

对此:
import { map } from 'rxjs/operators';

关于angular6 - 错误 : rxjs/operator/map has no exported member 'map' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52499187/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com