npm-check icon indicating copy to clipboard operation
npm-check copied to clipboard

unsed depdendecy finding issue

Open nishwalshetty opened this issue 3 years ago • 5 comments

npm-check searches for unsed depdendecies with this pattern "Depcheck did not find code similar to require('bricks.js') or import from 'bricks.js'" but we use like this "import bricks from 'bricks.js'; in code"

is this a bug or import .... from ... is not identificed by npm-check ? is there a fix for this becuase this looks like false postive.

nishwalshetty avatar Jan 24 '22 04:01 nishwalshetty

I am also experiencing the exactly same outcome on my react app too. It isn't able to find the import statements but libraries are being used.

Ajayff4 avatar Feb 25 '22 13:02 Ajayff4

@dylang could you please clarify ?

nishwalshetty avatar Feb 26 '22 10:02 nishwalshetty

I encountered the same when import has the form import * as redis from 'redis'. Npm-check claims redis is not used. And with import { useForm } from 'react-hook-form', npm-check claims react-hook-form not used.

vertti avatar Apr 10 '22 05:04 vertti

Same.

ian-axelrod avatar Sep 02 '22 16:09 ian-axelrod

Same with '@react-native-community/datetimepicker', i got import DateTimePicker from '@react-native-community/datetimepicker'; in my code but it cannot find it and tell me "Depcheck did not find code similar to require('@react-native-community/datetimepicker') or import from '@react-native-community/datetimepicker'."

JB712 avatar Nov 25 '22 12:11 JB712