vuepress: [Vue warn]: Error in render: "RangeError: Maximum call stack size exceeded"

  • I confirm that this is an issue rather than a question.

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:

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 22 (2 by maintainers)

Commits related to this issue

Most upvoted comments

同样遇到这个问题…

对于修改vue-router依旧没有修复问题的人,可以尝试使用npm i安装包,我之前使用yarn一直报错,更换npm之后build正常了。

I am getting this issue while triaging #2670

Long story short I am trying to add custom sidebar items through theme/util/index.js resolveSidebarItens like so

 let tags = []
    for (let page of site.pages) {
      for (let index in page.frontmatter.tags) {
        const tag = page.frontmatter.tags[index]
        var result = tags.find(t => {
          return t.title.toLowerCase().trim() === tag.toLowerCase().trim()
        });
        if (result == undefined)
        {
          let finalTag = {};
          finalTag.title = tag.toLowerCase().trim();
          finalTag.collapsable = true;
          finalTag.children = [];
          finalTag.children.push(page.regularPath.replace(".html",""));
          tags.push(finalTag);
        }
        else
        {
          if (result.children != undefined)
          {
            result.children.push(page.regularPath.replace(".html",""));
          }
        }
      }
    }

I than append the list of new sidebar items to resolve them

let newSidebarConfig = sidebarConfig.concat(recentNode).concat(tags);
const { base, config } = resolveMatchingConfig(regularPath, newSidebarConfig)

When I run npm run build I get this error (similar to above)

wait Rendering static HTML...

<--- Last few GCs --->

[29312:0000020B55E3C1F0]   218801 ms: Mark-sweep 1905.5 (2068.2) -> 1892.7 (2066.7) MB, 991.0 / 0.0 ms  (average mu = 0.120, current mu = 0.051) allocation failure scavenge might not succeed
[29312:0000020B55E3C1F0]   218840 ms: Scavenge 1907.3 (2066.7) -> 1899.9 (2067.7) MB, 14.9 / 0.0 ms  (average mu = 0.120, current mu = 0.051) allocation failure


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 00007FF77D9A223D]
Security context: 0x0341cc6c0919 <JSObject>
    1: assertProp(aka assertProp) [0000030DAABFC9B1] [D:\dev\mktg\azuretipsandtricks-private\src\node_modules\vue\dist\vue.runtime.common.dev.js:~1669] [pc=000000E22AA44335](this=0x01d0727804d1 <undefined>,0x01d62c02af61 <Object map = 000003148C36BA19>,0x01d072783df9 <String[#4]: name>,0x0159c5ebc109 <String[#8]: dropdown>,0x0152b5ba6ce1 <VueComponent map ...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Writing Node.js report to file: report.20201019.135512.29312.0.001.json
Node.js report completed
 1: 00007FF77CDEF0CF napi_wrap+121039
 2: 00007FF77CD951C6 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+34470
 3: 00007FF77CD95E86 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+37734
 4: 00007FF77D58899E private: void __cdecl v8::Isolate::ReportExternalAllocationLimitReached(void) __ptr64+94
 5: 00007FF77D570941 public: class v8::SharedArrayBuffer::Contents __cdecl v8::SharedArrayBuffer::Externalize(void) __ptr64+833
 6: 00007FF77D43EC7C public: static void __cdecl v8::internal::Heap::EphemeronKeyWriteBarrierFromCode(unsigned __int64,unsigned __int64,class v8::internal::Isolate * __ptr64)+1436
 7: 00007FF77D44811F public: void __cdecl v8::internal::Heap::ProtectUnprotectedMemoryChunks(void) __ptr64+1279
 8: 00007FF77D446604 public: static bool __cdecl v8::internal::Heap::PageFlagsAreConsistent(class v8::internal::HeapObject)+3204
 9: 00007FF77D43C253 public: bool __cdecl v8::internal::Heap::CollectGarbage(enum v8::internal::AllocationSpace,enum v8::internal::GarbageCollectionReason,enum v8::GCCallbackFlags) __ptr64+1235
10: 00007FF77D43AAF4 public: void __cdecl v8::internal::Heap::AddRetainedMap(class v8::internal::Handle<class v8::internal::Map>) __ptr64+2356
11: 00007FF77D45A305 public: class v8::internal::Handle<class v8::internal::HeapObject> __cdecl v8::internal::Factory::NewFillerObject(int,bool,enum v8::internal::AllocationType) __ptr64+53
12: 00007FF77D1C8F9D public: class v8::internal::interpreter::JumpTableTargetOffsets::iterator & __ptr64 __cdecl v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=(class v8::internal::interpreter::JumpTableTargetOffsets::iterator && __ptr64) __ptr64+3981
13: 00007FF77D9A223D public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+575565
14: 000000E22AA44335

I can get around this by changing the size of npm running

"build": "node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build"

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

    "devDependencies": {
        "@vuepress/plugin-google-analytics": "^1.7.1",
        "vuepress": "^1.7.1",
        "vuepress-plugin-janitor": "^1.0.0",
        "vuepress-plugin-rss": "^2.0.0",
        "yaml-front-matter": "^4.1.0",
        "vue-router": "^3.4.7"
    }

Happy to help triage in anyway I can.

Try it with node --max_old_space_size=8192 ./node_modules/vuepress/cli.js build src or node --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.

指定了vue-router版本为3.4.5后就可以了

  • I confirm that this is an issue rather than a question.

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版本为3.4.5后就可以了

话说我应该怎么修改vuepress所引用的vue-router的版本= =?求指导

package.json里面"dependencies"加上"vue-router": “3.4.5”

指定了vue-router版本为3.4.5后就可以了

  • I confirm that this is an issue rather than a question.

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版本为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 resolveSidebarItens like so

 let tags = []
    for (let page of site.pages) {
      for (let index in page.frontmatter.tags) {
        const tag = page.frontmatter.tags[index]
        var result = tags.find(t => {
          return t.title.toLowerCase().trim() === tag.toLowerCase().trim()
        });
        if (result == undefined)
        {
          let finalTag = {};
          finalTag.title = tag.toLowerCase().trim();
          finalTag.collapsable = true;
          finalTag.children = [];
          finalTag.children.push(page.regularPath.replace(".html",""));
          tags.push(finalTag);
        }
        else
        {
          if (result.children != undefined)
          {
            result.children.push(page.regularPath.replace(".html",""));
          }
        }
      }
    }

I than append the list of new sidebar items to resolve them

let newSidebarConfig = sidebarConfig.concat(recentNode).concat(tags);
const { base, config } = resolveMatchingConfig(regularPath, newSidebarConfig)

When I run npm run build I get this error (similar to above)

wait Rendering static HTML...

<--- Last few GCs --->

[29312:0000020B55E3C1F0]   218801 ms: Mark-sweep 1905.5 (2068.2) -> 1892.7 (2066.7) MB, 991.0 / 0.0 ms  (average mu = 0.120, current mu = 0.051) allocation failure scavenge might not succeed
[29312:0000020B55E3C1F0]   218840 ms: Scavenge 1907.3 (2066.7) -> 1899.9 (2067.7) MB, 14.9 / 0.0 ms  (average mu = 0.120, current mu = 0.051) allocation failure


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 00007FF77D9A223D]
Security context: 0x0341cc6c0919 <JSObject>
    1: assertProp(aka assertProp) [0000030DAABFC9B1] [D:\dev\mktg\azuretipsandtricks-private\src\node_modules\vue\dist\vue.runtime.common.dev.js:~1669] [pc=000000E22AA44335](this=0x01d0727804d1 <undefined>,0x01d62c02af61 <Object map = 000003148C36BA19>,0x01d072783df9 <String[#4]: name>,0x0159c5ebc109 <String[#8]: dropdown>,0x0152b5ba6ce1 <VueComponent map ...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Writing Node.js report to file: report.20201019.135512.29312.0.001.json
Node.js report completed
 1: 00007FF77CDEF0CF napi_wrap+121039
 2: 00007FF77CD951C6 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+34470
 3: 00007FF77CD95E86 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+37734
 4: 00007FF77D58899E private: void __cdecl v8::Isolate::ReportExternalAllocationLimitReached(void) __ptr64+94
 5: 00007FF77D570941 public: class v8::SharedArrayBuffer::Contents __cdecl v8::SharedArrayBuffer::Externalize(void) __ptr64+833
 6: 00007FF77D43EC7C public: static void __cdecl v8::internal::Heap::EphemeronKeyWriteBarrierFromCode(unsigned __int64,unsigned __int64,class v8::internal::Isolate * __ptr64)+1436
 7: 00007FF77D44811F public: void __cdecl v8::internal::Heap::ProtectUnprotectedMemoryChunks(void) __ptr64+1279
 8: 00007FF77D446604 public: static bool __cdecl v8::internal::Heap::PageFlagsAreConsistent(class v8::internal::HeapObject)+3204
 9: 00007FF77D43C253 public: bool __cdecl v8::internal::Heap::CollectGarbage(enum v8::internal::AllocationSpace,enum v8::internal::GarbageCollectionReason,enum v8::GCCallbackFlags) __ptr64+1235
10: 00007FF77D43AAF4 public: void __cdecl v8::internal::Heap::AddRetainedMap(class v8::internal::Handle<class v8::internal::Map>) __ptr64+2356
11: 00007FF77D45A305 public: class v8::internal::Handle<class v8::internal::HeapObject> __cdecl v8::internal::Factory::NewFillerObject(int,bool,enum v8::internal::AllocationType) __ptr64+53
12: 00007FF77D1C8F9D public: class v8::internal::interpreter::JumpTableTargetOffsets::iterator & __ptr64 __cdecl v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=(class v8::internal::interpreter::JumpTableTargetOffsets::iterator && __ptr64) __ptr64+3981
13: 00007FF77D9A223D public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+575565
14: 000000E22AA44335

I can get around this by changing the size of npm running

"build": "node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build"

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

    "devDependencies": {
        "@vuepress/plugin-google-analytics": "^1.7.1",
        "vuepress": "^1.7.1",
        "vuepress-plugin-janitor": "^1.0.0",
        "vuepress-plugin-rss": "^2.0.0",
        "yaml-front-matter": "^4.1.0",
        "vue-router": "^3.4.7"
    }

Happy to help triage in anyway I can.

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.

同样遇到这个问题,,,