Node create new Express project prompt an error: Failed to lookup view "error" in views directory
1. Use the EJS engine mode to report an error prompt FaiLED to lookup View “ERROR” in Views Directory
2. Solution
Add error.ejs to Views
<h1><%= message %></h1>
<h2><%= error.status %></h2>
<pre><%= error.stack %></pre>
3. ejs
template engine needs to be supplemented
Read More:
- Node.js Error: Cannot find module express [How to Solve]
- Node.js Error: Error: Cannot find module ‘express‘ [How to Solve]
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- [Solved] Vue create Create Project Error: command failed: npm install –loglevel error
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- [Weex]Error in creating project NPM: unable to load file D:\program files\nodejs\node_ global\ weex.ps1 Because scripts are not allowed to run on this system.
- How to Solve Vue project Startup Error (Node Upgrade issue)
- [Solved] Error: Cannot find module ‘@/views/xxx‘ at webpackEmptyContext
- [Solved] Vue-cli Create Project Error: ERROR command failed: yarn
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- Vue project change directory run error:Multiple assets emit different content to the same filename index.html
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment
- How to Solve NPM installation -g @view/client Error
- error in ./node_modules/@lit/reactive-element/decorators/state.jsModule parse failed: Unexpected
- [Solved] nodejs express Error: MulterError: Unexpected field
- [Solved] express-jwt Error: Error: jwt is not a function
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- [Solved] express-jwt Error: Error: algorithms should be set
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] NPM node ERROR in main..js from Terser ChildProcessWorker.initialize Excaption