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

♻️ Code Refactoring: upgrade lerna version #829

Merged
merged 3 commits into from
Apr 8, 2023

Conversation

coderj001
Copy link
Contributor

@coderj001 coderj001 commented Apr 6, 2023

@coderj001 coderj001 mentioned this pull request Apr 6, 2023
Copy link
Member

@kulla kulla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderj001 Thank for very much for your PR! ❤️ That's awesome that you want to help us! 👍

Conserining this PR: You can see that the tests fail. The reason is that changes in .yarn need to be committed as well. See my comments in #828 where there is a similar issue. In case you wonder why we also commit the .yarn folder – we follow https://yarnpkg.com/features/zero-installs

@kulla kulla linked an issue Apr 6, 2023 that may be closed by this pull request
@coderj001
Copy link
Contributor Author

@kulla commited .yarn folder, for test command got output ,

 RUNS  __tests__/internals/kratos-middleware.ts

<--- Last few GCs --->

[101540:0x6790300]   151786 ms: Mark-sweep 1896.4 (2090.4) -> 1879.1 (2087.9) MB, 711.4 / 0.0 ms  (average mu = 0.122, current mu = 0.063) allocation failure scavenge might not succeed
[101540:0x6790300]   152272 ms: Mark-sweep 1895.5 (2088.4) -> 1879.6 (2086.4) MB, 438.2 / 0.0 ms  (average mu = 0.113, current mu = 0.099) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb08e80 node::Abort() [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 2: 0xa1b70e  [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 3: 0xce1890 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 4: 0xce1c37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 5: 0xe992a5  [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 6: 0xe99d86  [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 7: 0xea82ae  [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 8: 0xea8cf0 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [$HOME/.nvm/versions/node/v16.19.0/bin/node]
 9: 0xeabc6e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [$HOME/.nvm/versions/node/v16.19.0/bin/node]
10: 0xe6d1aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [$HOME/.nvm/versions/node/v16.19.0/bin/node]
11: 0x11e5f96 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [$HOME/.nvm/versions/node/v16.19.0/bin/node]
12: 0x15d9c19  [$HOME/.nvm/versions/node/v16.19.0/bin/node]```

@coderj001
Copy link
Contributor Author

Why did you choose to use zero-install for this project?

Copy link
Member

@kulla kulla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderj001 Thanks! ❤️

@kulla kulla merged commit b0cc130 into serlo:main Apr 8, 2023
@kulla
Copy link
Member

kulla commented Apr 8, 2023

@coderj001 In the error message I see "JavaScript heap out of memory" -> Maybe you give your Node.JS to less memory to work with?! Might also be related to serlo/backlog#204 (see the linked bug of jest there)

Why did you choose to use zero-install for this project?

Then we have all dependencies in this repository – so once we have cloned it we can always work with it even if there is e.g. no internet connection. The only downside is that the first clone takes a lot of time and the repo is also bigger than normal. However https://yarnpkg.com/features/zero-installs mention workarounds with partial clones for example. Note that even when you do not include .yarn in your repo you need to download the dependencies anyway after the clone. So not including .yarn does not help you in this regard.

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

Successfully merging this pull request may close these issues.

Upgrade lerna
2 participants