[英]React app Module not found: Error: Can't resolve '../bugControler'
I got this problem when I started my react file import bugModel from '../Models/bugModel'
当我开始我的反应文件
import bugModel from '../Models/bugModel'
时我遇到了这个问题
export function retrieveBugs(){
let data = [];
data.push(new bugModel({
_id: 23456789,
name: "Crash on Load",
details:"Crashes after 3 seconds",
step:"Open application and it will crash",
version:"V2.0",
assigned:"Ryan Beasley",
creator:"Hanna Noskova",
priority:1,
time:"16:17",
}))
data.push(new bugModel({
_id: 23456789,
name: "Wont Load",
details:"Crashes after 3 seconds",
step:"Open application and it will crash",
version:"V2.0",
assigned:"Ryan Beasley",
creator:"Hanna Noskova",
priority:3,
time:"16:17",
}))
let sorted = data.sort((a,b)=>{return a.priority-b.priority})
return sorted;
}
I thought that the problem can be in './' and '../' because it is quite simillar.我认为问题可能出在“./”和“../”中,因为它们非常相似。 However I checked it and everything seems correct
但是我检查了一下,一切似乎都是正确的
We have to look at files structure to verify imports.我们必须查看文件结构来验证导入。 Please provide project repository or file structure tree on diagram.
请在图表上提供项目存储库或文件结构树。
./
refers to current calalog ./
指的是当前目录../
refers to one level up catalog ../
指的是上一级目录If you are sure about imports, please try to rerun npm start
script.如果您确定导入,请尝试重新运行
npm start
脚本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.