amazon-archives / cognito-sample-nodejs

Amazon Cognito Sample App for Node.js
Apache License 2.0
125 stars 38 forks source link

Error message for the Views #3

Open imyoungyang opened 6 years ago

imyoungyang commented 6 years ago

Error: Failed to lookup view "error" in views directory "/var/app/current/views" at Function.app.render (/var/app/current/node_modules/express/lib/application.js:492:17) at ServerResponse.res.render (/var/app/current/node_modules/express/lib/response.js:802:7) at Layer.handle (/var/app/current/server.js:246:9) at trim_prefix (/var/app/current/node_modules/express/lib/router/index.js:235:17) at /var/app/current/node_modules/express/lib/router/index.js:208:9 at Function.proto.process_params (/var/app/current/node_modules/express/lib/router/index.js:269:12) at next (/var/app/current/node_modules/express/lib/router/index.js:199:19) at trim_prefix (/var/app/current/node_modules/express/lib/router/index.js:237:11) at /var/app/current/node_modules/express/lib/router/index.js:208:9 at Function.proto.process_params (/var/app/current/node_modules/express/lib/router/index.js:269:12)

PaulRBerg commented 6 years ago

You call res.render somewhere in your code, without previously doing this:

app.set('views', path.join(__dirname, 'views'))