Cannot find module 'ionic-angular'

Hello.
This is Morimura.
Thanks matt, jjdev and jbmetrics for reply before.
And This is another problem.

When I run command ‘ionic service’, this error occurs.

[ng] ERROR in src/app/app.component.ts:2:26 - error TS2307: Cannot find module ‘ionic-angular’.
[ng] 2 import { Platform } from ‘ionic-angular’;

Help me so that I solve the problem.

Environment:
OS: windows 10
node: v12.13.0
npm: v6.12.0
ionic: 5.4.5

Thanks

There is no longer ‘ionic-angular’ exists in ionic 4 or greater.
it has been changed to ‘@ionic/angular’.

Try to import using,
import { Platform } from ‘@ionic/angular’;

Hope this do the needful.

2 Likes

thanks, ianurag.
It works.