错误:rxjs / operator / map没有导出的成员“ map”

时间:2018-09-25 13:18:02

标签: angular6 rxjs6

我正从5号角迁移到6号角。当我使npm run build时,我将其抛出以下错误:

  

错误TS2305:模块   '“ C:/PrjNET/Elevation3/FW/4.00/Mainline/Framework/Development/Client/ElevationJS/ngcore/.tmp/node_modules/rxjs/operator/map”   没有导出的成员“地图”。

我要导入<UserControl x:Class="-----.Controls.ControlUploadDataItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:-----.Controls" mc:Ignorable="d" d:DesignWidth="300" x:Name="UploadDataItem"> <StackPanel Background="{StaticResource SecondaryColorBrush}" Margin="0, 0, 0, 10"> <TextBlock FontSize="20" FontWeight="Bold" Foreground="{StaticResource PrimaryColorBrush}" Text="{Binding Name, FallbackValue='File Name'}" /> <TextBlock FontSize="10" FontStyle="Italic" Foreground="Gray" Text="{Binding FullName, FallbackValue='x:\\file\\path\\here'}" /> <!--<TextBlock FontWeight="Bold" Foreground="{StaticResource PrimaryColorBrush}" Text="{Binding Name, FallbackValue='File Name'}" />--> </StackPanel> ,如下所示:

map

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

1 个答案:

答案 0 :(得分:7)

只需要从此更改导入:

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

对此:

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