Error: rxjs/operator/map has no exported member 'map'

Error: rxjs/operator/map has no exported member 'map'

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

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';