Npm-check 5.1 is too zealous while looking for missing modules
See original GitHub issueHello! 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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Error returned when running ncu -g using Windows Terminal
The error occurs whenever I run ncu -g from Powershell or the standard cmd within the Windows Terminal app (not the default command...
Read more >npm-check
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...
Read more >npm install is missing modules - node.js
When I try this It tells me that I have no missing modules, although when I run npm list It is loaded with...
Read more >npm-check
Works on your globally installed packages too, via -g . ... By default npm-check will look at packages listed as dependencies and ...
Read more >How To Use Node.js Modules with npm and package.json
The description is very useful when people are searching for your ... If there is no package.json , Node.js will try to load...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have similar problems:
resolve.modules
in webpack config, so there are false positives for such modules. Config looks like this:I guess it’s not that easy to support this, though (in this example, it would require checking every nested
shared
folder in project).!!style!css?modules!postcss!.
). This issue is more common, I believe, and is probably easier to fix: split by!
, normalize loader names (style
->style-loader
) and then check them, something like that.The same here, when using webpack aliases: