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

set NODE_OPTIONS variable #25

Open
RayGuo-ergou opened this issue May 15, 2022 · 6 comments
Open

set NODE_OPTIONS variable #25

RayGuo-ergou opened this issue May 15, 2022 · 6 comments
Assignees

Comments

@RayGuo-ergou
Copy link

The command to set NODE_OPTIONS variable is vary due to the OS, e.g. linux uses export but windows uses set. So the current script "serve:angular13": "export NODE_OPTIONS=--max_old_space_size=4096&& ng serve --host 0.0.0.0", would not work on windows.

@RayGuo-ergou
Copy link
Author

RayGuo-ergou commented May 15, 2022

Found a solution from this post that uses node to set the NODE_OPTIONS. node --max-old-space-size=8192 index.js, for angular project could be "build-prod": "node --max-old-space-size=8192 ./node_modules/@angular/cli/bin/ng build --configuration=production".

@tancnle
Copy link

tancnle commented May 28, 2022

@RayGuo-ergou Just circling back to this issue, could you confirm that this happens on Powershell on Windows? How about WSL or Git Bash on Windows?

@RayGuo-ergou
Copy link
Author

PowerShell:
image

GitBash:
image

WSL would be fine as it just linux (Full Linux kernel in WSL2) and I used for all my tasks/PR reviews.

@tancnle

@tancnle
Copy link

tancnle commented May 28, 2022

I am wondering if we just stick with WSL2 for the Windows setup. The maintenance cost for other shells such as Powershell might not be worth it. What do you think?

I am keen to hear your thoughts as well @macite @jakerenzella 🙏🏼

@maddernd
Copy link

@tancnle I think this can be closed now as we are running in a dev container and this does not seem to be an issue any more.

@macite

@tancnle
Copy link

tancnle commented Nov 22, 2023

Thank you for the ping @maddernd. I think that's ok to close. However, if we don't support running on local machine without container, we should update the README to reflect that.

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