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

在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 null
at displayError (chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc/content.js:4:99)
at chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc/content.js:282:4

蝴蝶刀刀
浏览 692回答 1
1回答

人到中年有点甜

单单看控制台的错误信息的话,应该是页面中用到了textContent这个字段,但是这个字段的值为null,可以看下接口响应参数中textContent字段是否有值,或者查看一下页面中用到textContent的地方,做下非空判断
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript