code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.51k stars 140 forks source link

Two line annotations in the same line error #168

Closed pomber closed 2 years ago

pomber commented 2 years ago

This is the error:

<--- Last few GCs --->
6)[3982:0x641a090]   212573 ms: Mark-sweep (reduce) 2028.3 (2061.2) -> 2028.3 (2061.2) MB, 1522.7 / 0.0 ms  (+ 20.2 ms in 3 steps since start of marking, biggest step 10.3 ms, walltime since start of marking 1550 ms) (average mu = 0.176, current mu = 0.077)[3982:0x641a090]   214305 ms: Mark-sweep (reduce) 2038.4 (2071.5) -> 2038.4 (2071.5) MB, 1582.6 / 0.0 ms  (+ 19.6 ms in 3 steps since start of marking, biggest step 10.4 ms, walltime since start of marking 1610 ms) (average mu = 0.127, current mu = 0.075)

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb00e10 node::Abort() [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 2: 0xa1823b node::FatalError(char const*, char const*) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 3: 0xcee09e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 4: 0xcee417 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 5: 0xea65d5  [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 6: 0xea70b6  [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 7: 0xeb4fee  [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 8: 0xeb5a30 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
 9: 0xeb89ae v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
10: 0xe79dda v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
11: 0x11f350c v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
12: 0x15e7cf9  [/home/gitpod/.nvm/versions/node/v16.13.2/bin/node]
Aborted (core dumped)
error Command failed with exit code 134.

This is the code causing it:

<CH.Section>

Line numbers are turned off by default (I'm not a fan of line numbers). You can turn them on by setting _`lineNumbers: true`_.

```js your.config.js
mdxOptions = {
  remarkPlugins: [
    [
      remarkCodeHike,
      {
        theme: someTheme,
        // mark[9:25]
        // label but do you really need line numbers?
        // bg
        lineNumbers: true,
      },
    ],
  ],
};
```

</CH.Section>