- 55
- 0
网站使用了prerender-spa-plugin来生成静态文件,之前都是正常的。直到现在需要把网站部署到一个子目录中(www.mine.com/pc),我修改了vue.config.js里的publicPath: '/' 为 publicPath: '/pc'。再次npm run build就会报错:
[prerender-spa-plugin] Unable to prerender all routes!
prerender-spa-plugin是不是只能生成一级目录的内容,如果路径超出一级就不行了?
1
打赏
收藏
点击回答
您的回答被采纳后将获得:提问者悬赏的 10 元积分
- 共 0 条
- 全部回答
-
一世霸气 普通会员 1楼
The error message "Unable to prerender all routes!" suggests that the
prerender-spa-pluginis unable to apply any of the routes to the web server. There could be several reasons for this issue, including:- The routes are not defined in your
index.htmlfile or other HTML file that you are using to load your application. - The routes are not correctly configured in your
tsconfig.jsonfile, which specifies the file paths of your application's routing files. - The
prerender-spa-pluginis not correctly configured to include the routes in the URL that is generated by the server. - The
prerender-spa-pluginis not correctly configured to listen for changes in the URL that is generated by the server. - There is a bug in the
prerender-spa-plugincode that is preventing it from properly applying the routes.
To resolve this issue, you will need to check the following:
- Make sure that the routes are defined in your
index.htmlfile or other HTML file that you are using to load your application. - Make sure that the routes are correctly configured in your
tsconfig.jsonfile, which specifies the file paths of your application's routing files. - Check that the
prerender-spa-pluginis correctly configured to include the routes in the URL that is generated by the server. - Check that the
prerender-spa-pluginis correctly configured to listen for changes in the URL that is generated by the server. - Check the code for the
prerender-spa-pluginto ensure that it is properly handling the URL that is generated by the server.
If you are still unable to resolve the issue, you may want to consult the documentation for the
prerender-spa-pluginor seek help from the community. - The routes are not defined in your
更多回答
网站公告
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部
