View engine view path results to default after set manually
See original GitHub issueapp.set(‘views’, path.join(__dirname, ‘views’)); app.set(‘view engine’, ‘pug’);
This does not work, path still points to Failed to lookup view “admin/objects/list” in views directory “/tmp/backend/views” but should /tmp/backend/src/views as __dirname = /tmp/backend/src
Temporary fix is to uncomment default configuration resolve(‘views’) command.
app.defaultConfiguration = function defaultConfiguration() {
...
// default configuration
this.set('view', View);
**//this.set('views', resolve('views'));
this.set('jsonp callback name', 'callback');
};
"dependencies": {
"app-module-path": "^2.1.0",
"body-parser": "^1.15.2",
"chai": "^3.5.0",
"debug": "^2.3.2",
"express": "^4.14.0",
"install": "^0.8.2",
"is-my-json-valid": "^2.15.0",
"lowdb": "^0.14.0",
"mocha": "^3.1.2",
"npm": "^4.0.3",
"path": "^0.12.7",
"pug": "^2.0.0-beta6",
"socket.io": "^1.5.1",
"uuid": "^3.0.0",
"winston": "^2.3.0"
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Does setting view engine in ExpressJS cause res.render ...
Yes, that will make render look in 'views' ... settings it will tell you the default setting for view is process.cwd() + '/views'....
Read more >Circular View Path Error
In this tutorial, we'll look at how we get and resolve Circular View Path errors in a Spring MVC application.
Read more >How to: Render ASP.NET MVC Razor Views to Strings
The RenderViewToString() method works by receiving a controller context and virtual view path (i.e., ~/views/item/page.cshtml ) and optional ...
Read more >Use Controllers and Views to Implement a Listing/Details UI
Implementing the "NotFound" View Template View templates by default have two "content regions" where we can add content and code. The first ...
Read more >Customize pipeline configuration - GitLab Docs
Everyone With Access: Non-project members can also view pipelines. ... In GitLab versions 14.7 and later, newly created projects have a default git...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, no hurries. If you want I can try and describe issue here. I created the sample project so you can just “npm start” and go to /admin/objects url and it displays Failed lookup view message.
Hi, I know this is a really old issue, but I am looking through them to help clean them up. It seems the ZIP is no longer available, though. I’m going to close this for now, but if anyone is still having this issue, please open a new issue with a full reproduction case and we’ll take a fresh look.