facebook / memlab

A framework for finding JavaScript memory leaks and analyzing heap snapshots
https://facebook.github.io/memlab/
MIT License
4.3k stars 116 forks source link

/usr/bin/env: invalid option -- 'S' #78

Closed balihoo-jvakotar closed 1 year ago

balihoo-jvakotar commented 1 year ago

Node version: 16.19.0 npm: 9.6.4

Here attach screenshot for facing error: image

JacksonGL commented 1 year ago

Are you using Mac OS or Linux? What is the OS version?

JacksonGL commented 1 year ago

To quickly fix, use vim $(which memlab) to remove the -S in the shebang of the file: #!/usr/bin/env -S node --expose-gc --max-old-space-size=4096 -> #!/usr/bin/env node --expose-gc --max-old-space-size=4096

Alternatively, change the shebang to #!/usr/bin/env node.

If you are using a Linux distro (or Mac OS) that is not too old, -S should be supported by env.

JacksonGL commented 1 year ago

Closing since this issue cannot be replicated.