The article directories
Article Reference Express configuration interface template Failed to Lookup View “error” in Views Directory solution
This article refer to
- [https://www.cnblogs.com/alian111/p/5766078.html] (Failed to lookup the view “error” in views directory solution) ol>
Express configuration interface template
// view engine setup
app.set('views', path.join(__dirname, 'views')); //设置模板文件夹的路径
app.set('view engine', 'html'); //设置视图模板为ejs
app.engine('html',require('ejs').renderFile);
Failed to Lookup View “error” in Views Directory solution
When the template is loaded, there must be an error in the views folder. However, we formulated the ejs template in HTML format
, so we could not find the error.html and reported an error when the project was loaded. Therefore, a new error.html was created under the Views folder, which successfully solved the problem
Read More:
- Express error: Failed to lookup view “error” in views directory processing
- How to Fix unexpected directory layout in go language
- Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory (How to Fix)
- How to Fix Module build failed: Error: ENOENT: no such file or directory, scandir xxxxxx\node_…
- How to express ln function in MATLAB?
- Uncaught TypeError: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node How to Fix
- How to generate and view SSH keys in Ubuntu 16.04
- WordPress: How to Remove the directory name in the link
- How to Fix ubuntu phpmyadmin error: “Connection for controluser as defined in your configuration failed”
- How to Disable Protected View in Microsoft Excel
- IIS express failed to start
- Android resource compilation failed (How to Fix)
- How to Fix Spring Boot OTS parsing error: Failed to convert WOFF 2.0
- How to Fix ”is not in the sudoers file“ in Linux
- How to Fix Failed to add the host to the list of known hosts
- failed: Too many links (How to Fix)
- Android Studio: Application Installation Failed (How to Fix)
- How to Fix Error in module RSQL of the database interface
- How to Fix failed to Connect to MySQL at localhost:3306 with user root
- How to Fix Tomcat Error: Failed to destroy end point associated with ProtocolHandler[ajp-nio-8009]