Ionic Cannot find module '../providers/auth-service/auth-service'

混江龙づ霸主 提交于 2019-12-01 19:59:11

From your project structure, your login.ts is inside login folder, and login folder is inside pages folder.

So in order to reach providers folder, you need to write

'../../providers/auth-service/auth-service'

This should move you out of two folders which should solve the issue.

If you are using VS Code, install the plugin called "Typescript Hero" and "Typescript Toolbox", will help you with your imports.

Actually "Typescript Toolbox" shows a lightbulb when you focus your cursor on an imported element and you can select from the lightbulb the import. Very usefull.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!