浏览器访问时报not found错误

来源:2-2 环境搭建下

慕慕804234

2020-01-10

> satety_code@1.0.0 start /Users/admin/Documents/zhaoxuhua/autotest/satety_code

> node server.js


App http is listening on port 1521

enter site.js

(node:65783) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined

    at eval (eval at wrap (/Users/admin/Documents/zhaoxuhua/autotest/satety_code/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:10:246)

    at template (eval at wrap (/Users/admin/Documents/zhaoxuhua/autotest/satety_code/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:48:404)

    at KoaPug.compileFile (/Users/admin/Documents/zhaoxuhua/autotest/satety_code/node_modules/koa-pug/dist/index.js:92:66)

(node:65783) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:65783) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

enter site.js


一直没有找到这个id到底是哪个文件里的输入正文

写回答

1回答

TooooBug

2020-01-13

看起来是模板编译错误。对模板有做过什么修改吗?

也可以先确认一下数据有没有问题,有可能是数据有问题,在循环输出的时候读取出错。

1
2
慕慕804234
回复 慕慕804234老师,修改了数据库的数据。重新安装了jspm ,但是没有安装成功。配置文件package.json按老师项目中的配置加了jspm的配置。启动项目还是报not found.但是后台日志没有报错信息了。呜呜,快折磨死人了
2020-01-14
共2条回复

腾讯大牛亲授 Web前后端漏洞分析与防御技巧

提高每一行代码安全系数,突破前后端开发Web安全弱项

1186 学习 · 112 问题

查看课程