Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

[prerender-spa-plugin] Unable to prerender all routes! #469

Open
Zzdl opened this issue Sep 18, 2021 · 4 comments
Open

[prerender-spa-plugin] Unable to prerender all routes! #469

Zzdl opened this issue Sep 18, 2021 · 4 comments

Comments

@Zzdl
Copy link

Zzdl commented Sep 18, 2021

image

my object have set 17 routers,when i npm run build, that will throw above error;but when i delete a router,it`s work,could you help me how to work for it?thanks very much!!!

@jsbugwang
Copy link

jsbugwang commented Sep 28, 2021

如果是 Webpack5

请使用 [email protected]:jsbugwang/prerender-spa-plugin.git 的 webpack5 分支。已提交 pull request 。详情请见 pr 470

如果不是 Webpack5

请自行增加调试代码,即可找到问题

--- a/es6/index.js
+++ b/es6/index.js
@@ -146,6 +146,8 @@ PrerenderSPAPlugin.prototype.apply = function (compiler) {
       })
       .catch(err => {
         PrerendererInstance.destroy()
+        // 增加这行调试代码
+        console.log(err)
         const msg = '[prerender-spa-plugin] Unable to prerender all routes!'
         console.error(msg)
         compilation.errors.push(new Error(msg))

@Zzdl
Copy link
Author

Zzdl commented Oct 12, 2021

如果是 Webpack5

请使用 [email protected]:jsbugwang/prerender-spa-plugin.git 的 webpack5 分支。已提交 pull request 。详情请见 pr 470

如果不是 Webpack5

请自行增加调试代码,即可找到问题

--- a/es6/index.js
+++ b/es6/index.js
@@ -146,6 +146,8 @@ PrerenderSPAPlugin.prototype.apply = function (compiler) {
       })
       .catch(err => {
         PrerendererInstance.destroy()
+        // 增加这行调试代码
+        console.log(err)
         const msg = '[prerender-spa-plugin] Unable to prerender all routes!'
         console.error(msg)
         compilation.errors.push(new Error(msg))

非常感谢,我试试~

@zqcccc
Copy link

zqcccc commented Nov 3, 2021

https://webpack.js.org/blog/2020-10-10-webpack-5-release/#filesystems
webpack 5 没有 mkdirp 方法了
There is not mkdirp method in webpack 5

@Tofandel
Copy link

Tofandel commented Apr 2, 2022

Duplicate of #414, not compatible with webpack 5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants