Home > OS >  How to identify which dependencies use eval
How to identify which dependencies use eval

Time:03-28

I am trying to make a chrome extension but I get an error saying I can't use eval. My code doesn't contain eval so it has to be in one of my dependencies. What's a quick and easy way to see which dependency or sub-dependency is using eval? I removed node_modules from the search exclude on VSCode, and I got over 100 results, but it's still unclear which dependency has it because it is under some sub-dependency folders.

CodePudding user response:

npm ls eval

Is what I believe you want to use to list dependencies which depend on eval.

CodePudding user response:

You could search for a string in your project. These examples will search for "eval".

Windows Command

findstr /S "eval" ./*

Linux Command

grep -r "eval" *
  • Related