简体   繁体   中英

Failed to lookup view “error” after reinstalling windows?

Everything in my Node project worked perfectly, but then I decided to reinstall my Windows OS so I copyied all my project to Google drive. After i reinstalled, i went and downloaded my node project back to my desktop, installed node, and now i get this error: Failed to lookup view "error" in views directory "C:\\Users\\Tom\\Desktop\\Node\\views".....Why is this happening?

I have already searched for multiple solutions, but all of them say that this part of the code is to blame:

app.use(express.static(path.join(__dirname,'../public')));

I found the error. After reinstalling windows and sublime, when I inserted my project, the files got renamed from index.ejs to index.ejs.html.... after getting rid of the ".html", everything worked perfectly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM