Bug report
Steps to reproduce
npm run docs:build
What is expected?
What is actually happening?
wait Rendering static HTML...
[Vue warn]: Error in render: "RangeError: Maximum call stack size exceeded"
found in
---> <RouterLink>
<NavLink>
<BaseListLayout>
<Anonymous>
<GlobalLayout>
<Anonymous>
<Root>
error Error rendering /: false
undefined
RangeError: Maximum call stack size exceeded
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1555:13)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
(node:5134) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
at matchRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1677:5)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1555:13)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
at match (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1556:18)
at redirect (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1615:14)
at _createRoute (/home/travis/build/Messiahhh/writings/node_modules/vue-router/dist/vue-router.common.js:1654:14)
(node:5134) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5134) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Other relevant information
- Output of
npx vuepress info in my VuePress project:
同样遇到这个问题…
对于修改vue-router依旧没有修复问题的人,可以尝试使用npm i安装包,我之前使用yarn一直报错,更换npm之后build正常了。
Try it with
node --max_old_space_size=8192 ./node_modules/vuepress/cli.js build srcornode --max_old_space_size=4096 ./node_modules/vuepress/cli.js build src. Node.js default old space size is 2GB, and your site needs more while vuepress building. @isaacrlevin There may be possible memory leak in build process cased by the other isssue you trigged,My blog has nealy 700 pages, and it will take 6GB spare space to build.
Vuepress is bad with build process. From the source code, it will generate a lot of shallow copy with frontmatter, page object(including slug, frontmatter, headings and some other info) and even siteData copy. The build process is using a newer copy of these objects while referencing some parts of the old ones, so the old ones will move to “old space” instead of being gc off.
I had opened issues about this problem, but now none of the core team is active contribuiting on V1. Hope @meteorlxy 's V2 can improve this problem.
package.json里面"dependencies"加上"vue-router": “3.4.5”
指定了vue-router版本为3.4.5后就可以了
指定了vue-router版本为3.4.5后就可以了
I am getting this issue while triaging #2670
Long story short I am trying to add custom sidebar items through theme/util/index.js
resolveSidebarItenslike soI than append the list of new sidebar items to resolve them
When I run
npm run buildI get this error (similar to above)I can get around this by changing the size of npm running
But I than get the issue I am dealing with on that other issue. I believe these issues are connected in someway. Here are my devDependencies
Happy to help triage in anyway I can.
https://github.com/vuejs/vue-router/pull/3323
After multiple searches I found that the issue was I was import the vue 2 times ( one in my html page, which I was unaware of ) and one in script of the html page, and hence this issue. Confirm if anyone else can solve their issue by checking multiple instances of vue Thanks.
同样遇到这个问题,,,