dylang/npm-check

Npm-check 5.1 is too zealous while looking for missing modules

Open

#123 opened on Apr 4, 2016

View on GitHub
 (12 comments) (7 reactions) (0 assignees)JavaScript (6,438 stars) (278 forks)batch import
help wantedissue is in a dependencywho else wants this?

Description

Hello! First of all, thanks for your work, I love this helper as I love to keep my projects with depencies up to date!

Anyway since updating to 5.1 I noticed an annoying behaviour: npm-check is starting to look for modules everywhere, even in .eslintrc or karma.conf.js!

The worst part is that I use webpack resolve's modulesDirectories options to load my modules with absolute paths from the root of my project, so I have a lot of this calls:

import Header from 'components/header' or import * as api from 'utils/api'

Before 5.1 they were ignored, while now they are all caught making the report unreadable:

actions                             �  MISSING!  Not installed.
                                        �  PKG ERR!  Not in the package.json. Found in: \src\scripts\actio
ns\animations.js, \src\scripts\actions\blocks.js, \src\scripts\actions\currentConversation.js, \src\script
s\actions\mail.js, \src\scripts\components\Main.jsx...

and so on.

I tried also with the -s flag but it skips a lot of modules so it's not viable either.

Contributor guide