"export 'DOCUMENT' was not found in '@angular/platform-browser'

后端 未结 4 1153
醉酒成梦
醉酒成梦 2020-12-09 11:52

Happened while trying to upgrade IONIC app from version 3 to 4

Updated all plugins and modules to latest available, without any luck.

ERROR in ./node         


        
4条回答
  •  生来不讨喜
    2020-12-09 12:30

    I faced this issue while migrating to angular 8.x.x .

    Actually 'DOCUMENT' has been deprecated from '@angular/platform-browser' and is now part of '@angular/common'.

    Older plugins still try to import document from '@angular/platform-browser' . Just check in the .js and .js.map files under 'fesm5' as well as 'fesm2015' folder of the plugin in node_modules section.

    Better to update the specific plugin to latest angular compatible version.

    In my case troubling plugin was 'ngx-clipboard'.

提交回复
热议问题