渲染页面错误:Error: Failed to load script: /_next/static/chunks/pa



这是静态目录的图片
这个网站在本地正常运行,但是当我将它部署到heroku时,它会加载一半,然后变为空白,chrome控制台弹出错误,我仍然无法找到解决方案(它是使用ext.js, django和postgresql构建的)。我是新手,我需要帮助吗?

favourndubuisi.herokuapp.com

看起来你需要配置静态目录在Django安装Django正试图处理_next目录。

查看丢失块的错误报告。

http://favourndubuisi.herokuapp.com/_next/static/chunks/821.ff7693b6a698a8d3.js

Page not found (404)
Request Method: GET
Request URL:    http://favourndubuisi.herokuapp.com/_next/static/chunks/821.ff7693b6a698a8d3.js
Using the URLconf defined in config.urls, Django tried these URL patterns, in this order:
admin/
about/
projects/
technologies/
contact/
^static/(?P<path>.*)$
^media/(?P<path>.*)$
The current path, _next/static/chunks/821.ff7693b6a698a8d3.js, didn’t match any of these.
You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

但是,这个块可以工作http://favourndubuisi.herokuapp.com/static/_next/static/chunks/pages/index - 77 a9eb1106a2340d.js

这意味着你有一个静态目录,我将把_next下的所有项目放在Djangostatic目录下的static下,包括chunks文件夹。

我设法解决它通过删除和重新创建静态文件