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

Fail to run "vuepress dev" on Pixelbook / Debian #1066

Closed
traderd65 opened this issue Dec 3, 2018 · 8 comments
Closed

Fail to run "vuepress dev" on Pixelbook / Debian #1066

traderd65 opened this issue Dec 3, 2018 · 8 comments

Comments

@traderd65
Copy link

  • [ x] I confirm that this is a issue rather than a question.

Bug report

Running "Vuepress Dev" per installation instructions in Vuepress "Getting Started" tutorial

Version

vuepress/1.0.0-alpha.25 linux-x64 node-v11.2.0

Steps to reproduce

npm install -g vuepress
echo '# Hello VuePress' > README.md
vuepress dev

... the script runs for a while then crashes with:

[210:0x25e1fc0] 620422 ms: Mark-sweep 1379.4 (1450.8) -> 1370.6 (1454.8) MB, 1149.2 / 8.0 ms (average mu = 0.158, current mu = 0.049) allocation failure scavenge might not succeed
[210:0x25e1fc0] 622059 ms: Mark-sweep 1382.8 (1454.8) -> 1373.9 (1457.3) MB, 1577.9 / 6.7 ms (average mu = 0.091, current mu = 0.036) allocation failure scavenge might not succeed

<--- JS stacktrace --->

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

0: ExitFrame [pc: 0x1e06f5acfb5d]
1: StubFrame [pc: 0x1e06f5a8dd5a]

Security context: 0x321fedf9d9f1
2: join [0x1c882dc7ea31] [path.js:~1146] [pc=0x1e06f5b54b20](this=0x1c882dc022b1 )
3: arguments adaptor frame: 2->0
4: /* anonymous /(aka / anonymous */) [0x27ac1a0533c9] [/home/doronsherman/npm-global/lib/node_modules/vuepress/node_modules/readdirp/readdirp.js:~172] [pc=0x1e06f...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x944930 node::Abort() [node]
2: 0x9457dc node::OnFatalError(char const*, char const*) [node]
3: 0xb0d02e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb0d264 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xf09832 [node]
6: 0xf09938 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [node]
7: 0xf16058 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xf16b6b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xf198a1 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node]
10: 0xee3ad4 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node]
11: 0x11994be v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node]
12: 0x1e06f5acfb5d
Aborted
...
There are also multiple messages "Language does not exist sh" during the script run. The failure occurs while compiling vue-eslint-parser... eslint-scope...

What is expected?

Advise how to get vuepress setup on the Pixelbook Debian container.

What is actually happening?

Crash (reported above)

Other relevant information

  • Your OS: Chrome OS
  • Node.js version: 11.2.0
  • Browser version: Chrome
  • Is this a global or local install? global install under npm-global folder in home directory
  • Which package manager did you use for the install? npm

@spiltcoffee
Copy link
Contributor

Seeing a few lines saying "out of memory" in the dump there. How much memory does the container have access to? Are you able to increase that?

Also, if you're trying to run vuepress dev on nodejs >=v10, bump the version to 1.0.0-alpha.27 to make sure #1063 isn't affecting you.

@traderd65
Copy link
Author

traderd65 commented Dec 4, 2018

myname@penguin:~$ free --mega
                    total        used        free      shared  buff/cache   available
Mem:           5074         138        3922          32        1014        4410
Swap:             0           0           0

Same fatal error (JavaScript heap out of memory) after upgrading to 1.0.0-alpha.27

@ulivz
Copy link
Member

ulivz commented Dec 4, 2018

Could you increase your memory via --max-old-space-size and try again?

@traderd65
Copy link
Author

traderd65 commented Dec 6, 2018

Do you mean I should run:

vuepress dev --max-old-space-size=4096

(tried both 4096 and 8192, same error)

@spiltcoffee
Copy link
Contributor

I think the flag needs to be passed to nodejs itself, so maybe try NODE_OPTIONS="--max-old-space-size=8192" vuepress dev

@traderd65
Copy link
Author

vuepress dev NODE_OPTIONS="--max-old-space-size=4096"

worked!

vuepress build NODE_OPTIONS="--max-old-space-size=4096"

also worked but placed the .vuepress folder under a top folder named "NODE_OPTIONS="--max-old-space-size=4096""

@spiltcoffee
Copy link
Contributor

spiltcoffee commented Dec 6, 2018

Make sure to either put it first or even run the NODE_OPTIONS as a separate command first so you don't pass the environment variable assignment in as an argument to vuepress accidentally.

@ulivz ulivz closed this as completed Dec 7, 2018
@traderd65
Copy link
Author

traderd65 commented Dec 8, 2018

When setting NODE_OPTIONS="--max-old-space-size=8192" then running vuepress dev, the same JavaScript heap out of memory error occurs. I'm assuming the NODE_OPTIONS setting holds for the subsequent vuepress command run so not sure what else to try at this point.

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

3 participants