I'm looking for a way to remove comments from my config.js file, which is acting as a JSON file in my project. The config file has both single line comments like this:
//comment goes here
and multi-line comments like this:
/* comments goes here */
To remove these comments, I decided to use the strip-json-comments package. I installed it globally using the following command:
npm install --global strip-json-comments
However, when I try to run the command in Node command prompt, I encounter an error:
strip-json-comments config.js > config_comments_removed.js
The error message reads:
'strip-json-comments' is not recognized as an internal or external command,operable program or batch file.
If anyone could offer assistance on resolving this issue, I would greatly appreciate it. Thank you in advance!