prerender-spa-plugin
prerender-spa-plugin copied to clipboard
[prerender-spa-plugin] Unable to prerender all routes!
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!!!
如果是 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))
如果是 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))
非常感谢,我试试~
https://webpack.js.org/blog/2020-10-10-webpack-5-release/#filesystems webpack 5 没有 mkdirp 方法了 There is not mkdirp method in webpack 5
Duplicate of https://github.com/chrisvfritz/prerender-spa-plugin/issues/414, not compatible with webpack 5