鍍金池/ 問答/Python  HTML/ react 路由 webpack調(diào)試正常,打包后路由不起作用

react 路由 webpack調(diào)試正常,打包后路由不起作用

在webpack的服務(wù)器8080端口開發(fā)調(diào)試好好的,本地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

回答
編輯回答
抱緊我

單單看控制臺的錯誤信息的話,應(yīng)該是頁面中用到了textContent這個字段,但是這個字段的值為null,可以看下接口響應(yīng)參數(shù)中textContent字段是否有值,或者查看一下頁面中用到textContent的地方,做下非空判斷

2017年9月28日 07:48