Skip to content

refactor: migrate to frontend-base #669

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

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

refactor: migrate to frontend-base #669

wants to merge 20 commits into from

Conversation

arbrandes
Copy link
Contributor

@arbrandes arbrandes commented Jun 24, 2025

Description

Refer to the parent issue for a full description.

In short, this refactors the codebase for frontend-base support. There are several breaking changes. It is a long-lived feature branch, and as such, should not be rebased or squashed until time comes for it to either merge to master or become master.

BREAKING CHANGE: refactors the MFE for frontend-base.
@arbrandes arbrandes requested a review from a team as a code owner June 24, 2025 18:58
@arbrandes arbrandes marked this pull request as draft June 24, 2025 18:59
@brian-smith-tcril
Copy link
Contributor

When trying to run npm run dev locally I hit the following error:

node:internal/fs/watchers:247
    const error = new UVException({
                  ^

Error: ENOSPC: System limit for number of file watchers reached, watch '/home/bsmith/code/frontend-app-learner-dashboard/node_modules/serve-index/node_modules/http-errors/LICENSE'

I did a bit of searching and found https://stackoverflow.com/a/65621732

I had the same problem. However, mine was coming from Webpack. Thankfully, they had a great solution on their site:

For some systems, watching many files can result in a lot of CPU or memory usage. It is possible to exclude a huge folder like node_modules using a regular expression:

module.exports = {
  watchOptions: {
    ignored: /node_modules/
  }
};

I haven't tried, but my guess is that adding a watchOptions block to https://github.com/openedx/frontend-base/blob/main/tools/webpack/webpack.config.dev.ts might fix this.

@arbrandes
Copy link
Contributor Author

arbrandes commented Jun 25, 2025

@brian-smith-tcril, what I did was just increase my fs.inotify.max_user_watches to 524288 in sysctl.conf. There's no reason to stick with the low default on modern systems.

That said, yes, it's arguable that few people will go messing around in node_modules, and fewer still would expect changes to be applied immediately.

@arbrandes arbrandes linked an issue Jun 25, 2025 that may be closed by this pull request
17 tasks
@brian-smith-tcril
Copy link
Contributor

@brian-smith-tcril, what I did was just increase my fs.inotify.max_user_watches to 524288 in sysctl.conf. There's no reason to stick with the low default on modern systems.

That said, yes, it's arguable that few people will go messing around in node_modules, and fewer still would expect changes to be applied immediately.

Yeah, some of the other answers on that stackoverflow thread recommended increasing that limit. The reason excluding node_modules feels like a better solution to me is that it removes the need to do some "scary" (even if it's a reasonable change) configuration of dev environments.

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

Successfully merging this pull request may close these issues.

Convert Learner Dashboard to frontend-base
2 participants