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

Is there a way to use the preload args of node? #223

Open
vanabel opened this issue Apr 26, 2019 · 3 comments
Open

Is there a way to use the preload args of node? #223

vanabel opened this issue Apr 26, 2019 · 3 comments

Comments

@vanabel
Copy link

vanabel commented Apr 26, 2019

I find some project need to start with the pre-load command;

node -r esm main.js

I try to run it as

supervisor -- main.js -r esm

However, this not work, did you know any solution?

@cschinnerl-cf
Copy link

Hello, I had the same problem but with --harmony-proxies, you need the "-r esm" passed to node not to your program, so you need to add the support for the "-r" argument to supervisor. Like I did in my fork:
cschinnerl-cf@53d418a

But maybe I should have done a pull request back, so it would stay up to date.

@vanabel
Copy link
Author

vanabel commented Apr 26, 2019

I solved it by adding an index.js and call main.js in it as the esm package home.

@sonickseven
Copy link

sonickseven commented Sep 3, 2020

I solved it by adding an index.js and call main.js in it as the esm package home.

hey do you can explain me how did you make it?

I have not could understand it

i created two files(indez and main) but my main file js is app.js and i run node app and continue the problem

and when i run node -r esm app.js works fine

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