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

/usr/bin/env: ‘node -r esm’: No such file or directory #223

Open
lomeiyemei opened this issue Dec 31, 2024 · 4 comments
Open

/usr/bin/env: ‘node -r esm’: No such file or directory #223

lomeiyemei opened this issue Dec 31, 2024 · 4 comments

Comments

@lomeiyemei
Copy link

After bin/server --port 1234, have the following error

/usr/bin/env: ‘node -r esm’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines

I have google and no relevant information to correct it. What is the issue here and how to fix it?

@n-for-all
Copy link

edit bin/server and add -S before node -r esm
so the line becomes:

#!/usr/bin/env -S node -r esm

Read more here:
https://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-for-awk-with-a-shebang-i-e

@lomeiyemei
Copy link
Author

Thanks for answer. Will try it out

@lomeiyemei
Copy link
Author

I have add -S as instructed

However I got follow error

node[57945]: void node::fs::InternalModuleStat(const v8::FunctionCallbackInfov8::Value&) at ../src/node_file.cc:1037

Assertion failed: (args.Length()) >= (2)

----- Native stack trace -----

1: 0xf76da7 node::Assert(node::AssertionInfo const&) [node]
2: 0xf7e397 [node]
3: 0x7f68abe0f5e2

----- JavaScript stack trace -----

1: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:34535
2: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:34176
3: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:34506
4: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:173374
5: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:173420
6: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:173521
7: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:258942
8: /home/lomei/localtunnel-server/node_modules/esm/esm.js:1:261569
9: e (/home/lomei/localtunnel-server/node_modules/esm/esm.js:1:262673)
10: get (/home/lomei/localtunnel-server/node_modules/esm/esm.js:1:262740)

Aborted

@n-for-all
Copy link

n-for-all commented Jan 21, 2025 via email

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

2 participants