facebook / memlab

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

"-S" is not recognized as an internal or external command #24

Closed palak-temp closed 1 year ago

palak-temp commented 1 year ago

I have tried to run the default demo app as mentioned in the readme doc.

image

JacksonGL commented 1 year ago

@palaklive memlab doesn't provide a npm start command (it's not mentioned in the readme doc). Please follow the steps on the readme file and manually run the following command

memlab run --scenario the-scenario-file.js
palak-temp commented 1 year ago

Hello @JacksonGL

I have set up the project and add memlab as a developer dependency. So, basically npm start executes the memlab run --scenario file

palak-temp commented 1 year ago

even the following doc gives the same error.

JacksonGL commented 1 year ago

@palaklive The ad hoc fix would be going to the C:\Users\YourUserName\AppData\Roaming\npm\ folder, open the memlab file and remove -S. (assuming you are using Windows and the main drive is C)

The MemLab install command checks if you are running on Windows, and it should auto remove the -S flag which is only used on Mac OS and Linux.

I wasn't able to reproduce the error you encountered from my Windows machines (either by installing the npm package or build it directly from Git repo). Can you provide more details on how you installed the memlab package?

JacksonGL commented 1 year ago

@palaklive I think I may know what happened. I have updated the npm package, please remove the ./node_modules folder and package-lock.json file under your project rerun npm install --dev memlab@latest and see if it works.

Thanks for reporting this issue!

palak-temp commented 1 year ago

Your guidance @JacksonGL is much appreciated, after tacking the pull from the repo issue has been resolved.

image