为了账号安全,请及时绑定邮箱和手机立即绑定

react 路由 webpack调试正常,打包后路由不起作用

react 路由 webpack调试正常,打包后路由不起作用

蝴蝶刀刀 2019-03-16 18:15:46
在webpack的服务器8080端口开发调试好好的,本地80端口只能打开主页,其他路径都是报错的[an error occurred while processing this directive] The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. [an error occurred while processing this directive]这是页面报错信息下面是控制台报错信息Error in event handler for (unknown): TypeError: Cannot read property 'textContent' of nullat displayError (chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc/content.js:4:99)at chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc/content.js:282:4
查看完整描述

1 回答

?
人到中年有点甜

TA贡献1895条经验 获得超7个赞

单单看控制台的错误信息的话,应该是页面中用到了textContent这个字段,但是这个字段的值为null,可以看下接口响应参数中textContent字段是否有值,或者查看一下页面中用到textContent的地方,做下非空判断


查看完整回答
反对 回复 2019-04-09
  • 1 回答
  • 0 关注
  • 685 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信