简体   繁体   English

ionic:Runtime Error找不到模块“ ../pages/home/home”

[英]ionic:Runtime Error Cannot find module “../pages/home/home”

I want to make an app in ionic, so I add some custom page in ionic by command : 我想在ionic中制作一个应用,所以我通过以下命令在ionic中添加了一些自定义页面:

ionic g page user

But I start ionic server it show error 但是我启动离子服务器显示错误

Runtime Error Cannot find module "../pages/home/home" 运行时错误找不到模块“ ../pages/home/home”

click for error image 点击查看错误图片

If the app tells you that it misses a file, that's because there's somewhere where you imported this file and it doesn't exist (anymore? maybe you deleted it and forgot to delete an import) 如果应用程序告诉您它错过了一个文件,那是因为您在某处导入了此文件,并且该文件不存在(再来了?也许您删除了它,却忘记了删除导入)

You should make a project-wide text search using grep or your favorite ide to find where you are importing "../pages/home/home". 您应该使用grep或您最喜欢的ide在项目范围内进行文本搜索,以找到要导入“ ../pages/home/home”的位置。

Your error doesn't come from your ionic g page user command as this command only generates a page named user. 您的错误并非来自您的ionic g page user命令,因为此命令仅生成一个名为user的页面。

It seems like you created a page called home and deleted it without deleting imports. 好像您创建了一个名为home的页面,并在不删除导入的情况下将其删除。

I encountered the same problem when I was github clone code. 当我是github克隆代码时,我遇到了同样的问题。 But this is not the problem with the code itself, but because I used cnpm (npm of the Chinese version). 但这不是代码本身的问题,而是因为我使用了cnpm(中文版本的npm)。 Uninstall npm, install npm. 卸载npm,安装npm。 The problem is solved 问题已经解决了

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我会收到此 npm 错误:无法从“/home/directory”中找到模块“/home/directory” - Why do i get this npm Error: Cannot find module '/home/directory' from '/home/directory' nodemon 找不到模块'/path/to/project/home/index.js' - nodemon Cannot find module '/path/to/project/home/index.js' Next.js:模块构建失败:错误:无法从“/home/ugurkaya/Desktop”中找到模块“react-hot-loader/babel” - Next.js: Module build failed: Error: Cannot find module 'react-hot-loader/babel' from '/home/ugurkaya/Desktop' 找不到模块:错误:无法解析“/Users/username/Documents/Privat/ionic3-barcodev3/src/app/home”中的“./home.html” - Module not found: Error: Can't resolve './home.html' in '/Users/username/Documents/Privat/ionic3-barcodev3/src/app/home' 错误:无法从“/home/dolphin/sync/source/cruise-web”找到模块“@babel/plugin-proposal-decorators” - Error: Cannot find module '@babel/plugin-proposal-decorators' from '/home/dolphin/sync/source/cruise-web' 如何解决找不到找不到模块'../home/featuredRooms'或其对应的类型声明。? - how to solve cannot find Cannot find module '../home/featuredRooms' or its corresponding type declarations.? Browserify:浏览器“找不到模块...”中的运行时错误 - Browserify: runtime in browser 'Cannot find module…' error 运行时错误:找不到模块“./config” - Runtime Error: Cannot find module “./config” 找不到模块离子 - Cannot find module Ionic 找不到模块:错误:无法解析“主页” - Module not found: Error: Can't resolve 'Home'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM