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

后端 未结 4 1147
醉酒成梦
醉酒成梦 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:37

    It appears that you may be trying to upgrade your Ionic project from v3 to v4 inline rather than creating a new v4 project and migrating your old code over.

    See the migration guide: https://ionicframework.com/docs/building/migration. Specifically this advice:

    While migrating an app to take advantage of this new layout, it is suggested that a new project "base" is made with the CLI. Then, with the new project layout, migrate the features of the app piece by piece. Pages/components/etc. should be moved into the src/app/ folder.

    If you are trying this by keeping your code in place and installing @ionic/angular in the current project rather than creating a NEW project and then copying code over feature by feature, then you are going to run into a lot of problems. If you are doing that, I suggest starting over employing the strategy outlined above. Having done a few of these myself, that is by far your best option.

提交回复
热议问题