Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
quanzaiyu opened this issue Oct 29, 2018 · 7 comments

Comments

@quanzaiyu
Copy link

Bug report

When running vuepress build website, it reports an error

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

Version

1.0.0-alpha.17

Steps to reproduce

package.json

{
  "scripts": {
    "build": "vuepress build website"
   }
}

run yarn build

What is expected?

Fix this error.

What is actually happening?

(node:27516) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
[22:46:54] Compiled Server in 27s
[22:47:02] Compiled Client in 34s
 WAIT  Rendering static HTML...
Rendering page: /books/road_vue_router/Guard.html
<--- Last few GCs --->

[27516:000001E86E570900]   244905 ms: Scavenge 1318.3 (1423.9) -> 1317.6 (1423.9) MB, 2.8 / 0.0 ms  (average mu = 0.112, current mu = 0.062) allocation failure
[27516:000001E86E570900]   244923 ms: Scavenge 1318.6 (1423.9) -> 1318.1 (1423.9) MB, 3.7 / 0.0 ms  (average mu = 0.112, current mu = 0.062) allocation failure
[27516:000001E86E570900]   244930 ms: Scavenge 1318.6 (1423.9) -> 1318.2 (1424.4) MB, 2.8 / 0.0 ms  (average mu = 0.112, current mu = 0.062) allocation failure


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0000030D49F5C6C1]
    1: StubFrame [pc: 0000030D49F4E2EC]
Security context: 0x0268e2c1e681 <JSObject>
    2: replace [00000268E2C10C01](this=0x02e8c72ae589 <String[1]: />,0x006b1bec5111 <JSRegExp <String[25]: ([.+*?=^!:${}()[\]|\/\\])>>,0x008fedf7a139 <String[3]: \$1>)
    3: addRouteRecord(aka addRouteRecord) [0000020FFDFAEBB9] [D:\Workplace\__Blog__\quanzaiyu\node_modules\vue-router\dist\vue-router.common.js:~1137]...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF772D6EEE5
 2: 00007FF772D48CD6
 3: 00007FF772D496E0
 4: 00007FF7731B0D3E
 5: 00007FF7731B0C6F
 6: 00007FF7730FC594
 7: 00007FF7730F2B67
 8: 00007FF7730F10DC
 9: 00007FF7730FA0B7
10: 00007FF7730FA136
11: 00007FF77321F5E8
12: 00007FF77321FF62
13: 00007FF773348F15
14: 00007FF77334BADA
15: 00007FF7733502AF
16: 0000030D49F5C6C1

Other relevant information

  • Your OS: Windows 10 Edu 1803
  • Node.js version: v10.11.0
  • Browser version: Chrome 70.0.3538.67 x64
  • Is this a global or local install? local
  • Which package manager did you use for the install? yarn
@quanzaiyu
Copy link
Author

It seems to be a problem of plugin-pwa

When I write it as

  plugins: {
    '@vuepress/pwa': {
      serviceWorker: true,
      updatePopup: true
    }
  },

it's wrong.

When I write it as

  plugins: [
    '@vuepress/pwa'
  ]

it's right.

@ulivz
Copy link
Member

ulivz commented Nov 9, 2018

I don't why most of people NEVER provide a reproduction repo though I have repeatedly emphasized in the issue template.

Hope you cooperate with our work, thank you!

@0w0k
Copy link

0w0k commented Nov 9, 2018

what mean is reproduction repo?
maybe i can help him.

@ulivz
Copy link
Member

ulivz commented Nov 9, 2018

Reproduction repo example: https://github.com/Eterion/issue-vuepress-badge

@quanzaiyu
Copy link
Author

It solved, modify package.json:

{
  "scripts": {
    "dev": "node --max_old_space_size=8192 ./node_modules/vuepress/vuepress.js dev website",
    "build": "node --max_old_space_size=8192 ./node_modules/vuepress/vuepress.js build website",
  }
}

thank you!

@deliangyang
Copy link

deliangyang commented Feb 1, 2021

Bad idea.

@mimof9
Copy link

mimof9 commented Sep 29, 2021

Bad idea.

Maybe you can contribute your idea?

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

No branches or pull requests

5 participants