Comments (6)
@atodhruv It seems like it could find the file in the directory?
from serverless-nodejs-starter.
But there is file named "error.ejs" exist in /views folder
if I remove app.engine('.ejs', ejs);
line form app.js witll give following error
Error: Cannot find module 'ejs'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at new View (/var/task/node_modules/express/lib/view.js:81:14)
at EventEmitter.render (/var/task/node_modules/express/lib/application.js:570:12)
at ServerResponse.render (/var/task/node_modules/express/lib/response.js:1008:7)
at /var/task/webpack:/app.js:66:9
at Layer.handle_error (/var/task/node_modules/express/lib/router/layer.js:71:5)
at trim_prefix (/var/task/node_modules/express/lib/router/index.js:315:13)
at /var/task/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
at next (/var/task/node_modules/express/lib/router/index.js:275:10)
at Layer.handle_error (/var/task/node_modules/express/lib/router/layer.js:67:12)
at trim_prefix (/var/task/node_modules/express/lib/router/index.js:315:13)
at /var/task/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
at Immediate.next (/var/task/node_modules/express/lib/router/index.js:275:10)
at Immediate. (/var/task/node_modules/express/lib/router/index.js:635:15)
at runCallback (timers.js:674:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
from serverless-nodejs-starter.
I think res.render('view_name')
not working
from serverless-nodejs-starter.
@atodhruv I'm not sure if I follow. Where did the .ejs
files and the views
come from?
from serverless-nodejs-starter.
It project structure is
-Project
-- controllers
-- views
-- services
-- node_modules
-- public
-- routes
-- app.js
-- lambda.js
-- serverless.yml
@
from serverless-nodejs-starter.
@atodhruv I'm not sure what is going on here but is it related to the starter project?
from serverless-nodejs-starter.
Related Issues (20)
- Feature request: SAM template HOT 1
- Babel 7 support HOT 1
- Error message when installing dependencies HOT 5
- Any future updates to this repo - like updating to Node 10.x HOT 3
- Error: Can't resolve 'source-map-support/register' in 'libs/response-lib.js' HOT 17
- AWS_PROFILE=default serverless invoke local --function create --path mocks/create-event.json HOT 1
- Function Routes Defined in file not loaded HOT 2
- Clean install with deploy results in non-webpacked node functions HOT 1
- Debug lambda using VScode
- Tests do not load .env or serverless.yml variables HOT 8
- Can't create a project on Windows 10 - Request timed out HOT 1
- Cannot run sample project on aws lambda HOT 1
- Sharp module not found after deploy HOT 2
- Create Ticket - Instructor HOT 1
- Initial install throws serverless DeprecationWarning DEP0066
- Build crashes when using email-templates HOT 3
- Typescript version of the repo HOT 2
- gyp verb `which` failed Error: not found: python2 HOT 16
- As per Indian regulations, only registered Indian businesses (i.e. sole proprietorships, limited liability partnerships and companies, but not individuals) can accept international payments. More info here: https://stripe.com/docs/india-exports\" error.
- Serverless: Operation failed!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-nodejs-starter.