chocolatey / chocolatey/docs

Running `npx astro check` results in out of memory error

Open
#1,262 0 comments 0 reactions 1 assignee Claimed by @st3phhays View on GitHub
0 - Backlog Bug
Dominant language
MDX
Stars
223
Forks
248
Avg merge
1d 26m
Merged PRs (30d)
4

Description

### Checklist
* [x] I confirm there are no unresolved issues reported on the [Chocolatey Status page](https://status.chocolatey.org).
* [x] I have verified this is the correct repository for opening this issue.
* [x] I have verified no other issues exist related to my problem.
* [x] I have verified this is not an issue for a specific package.
* [x] I have verified this issue is not security related.
* [x] I confirm I am using **official**, and **not** unofficial, or modified, Chocolatey products.

### What You Are Seeing?
When running `npx astro check` on docs.chocolatey.org, it results in the error `FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory`.

### What is Expected?
This command should work as expected and not result in a memory error.

### How Did You Get This To Happen?
1. Run `npx astro check` from the root of the [docs repository](https://github.com/chocolatey/docs).
1. Notice the error in the console.

### System Details
This is happening locally, and on GitHub Actions.

### Installed Packages

This is coming from the `@astrojs/check@0.9.6` package that is installed via `@chocolatey-software/astro@2.1.0`. Currently there is no newer version of @astrojs/check to upgrade to.

### Output Log
```bash
14:36:34 [check] Getting diagnostics for Astro files in C:\source\docs...

<--- Last few GCs --->

[13812:000002661B2E1000] 59689 ms: Mark-Compact 8069.4 (8228.4) -> 8062.1 (8238.9) MB, pooled: 0 MB, 1437.11 / 0.00 ms (average mu = 0.570, current mu = 0.438) allocation failure; scavenge might not succeed
[13812:000002661B2E1000] 63308 ms: Mark-Compact 8078.0 (8239.1) -> 8072.2 (8249.4) MB, pooled: 0 MB, 3576.55 / 0.00 ms (average mu = 0.312, current mu = 0.012) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 00007FF6F189BD7B void __cdecl node::SetCppgcReference(class v8::Isolate * __ptr64,class v8::Local,void * __ptr64)+16011
2: 00007FF6F1804BC8 DSA_meth_get_flags+92344
3: 00007FF6F2392C31 private: void __cdecl v8::Isolate::ReportExternalAllocationLimitReached(void) __ptr64+65
4: 00007FF6F237FA36 public: bool __cdecl v8::Function::Experimental_IsNopFunction(void)const __ptr64+2918
5: 00007FF6F21CB6E0 protected: __cdecl v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase(class v8::Isolate * __ptr64) __ptr64+31552
6: 00007FF6F21C8737 protected: __cdecl v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase(class v8::Isolate * __ptr64) __ptr64+19351
7: 00007FF6F21DDE34 public: class v8::HeapProfiler * __ptr64 __cdecl v8::Isolate::GetHeapProfiler(void) __ptr64+7428
8: 00007FF6F21DE6BA public: class v8::HeapProfiler * __ptr64 __cdecl v8::Isolate::GetHeapProfiler(void) __ptr64+9610
9: 00007FF6F21EF117 public: class v8::HeapProfiler * __ptr64 __cdecl v8::Isolate::GetHeapProfiler(void) __ptr64+77799
10: 00007FF6F1EAD83B public: static void __cdecl v8::internal::Version::GetString(class v8::base::Vector)+435083
11: 00007FF69242D4BA
```

### Additional Context
There is an issue for this on Astro at: https://github.com/withastro/astro/issues/1711

Increasing memory to over 8gb did not help. Deleting the `dist` folder as suggested did not help either.

┆Issue is synchronized with this [Github issue](https://github.com/chocolatey/choco-theme/issues/499) by [Unito](https://www.unito.io)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.