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

memlab is not accessible after installation #85

Closed pratik36 closed 1 year ago

pratik36 commented 1 year ago

Hello Team,

I have installed the memlab on a CentOS machine and after installation, I am not able to access it.

Version used: node: 16.19.1 npm: 8.19.3

Error:

/usr/bin/env: invalid option -- 'S' Try '/usr/bin/env --help' for more information.

Please suggest how to fix the above-mentioned issue. Refer to the screenshots. Thank you!

issue memlab-installation

JacksonGL commented 1 year ago

It appears that somehow the CentOS release you are using does not support -S in the shebang. I tested on CentOS v8, -S should be supported.

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

pratik36 commented 1 year ago

Thank you @JacksonGL - the above-shared solution has fixed the issue.