knip icon indicating copy to clipboard operation
knip copied to clipboard

nextjs - Unused dependencies found after upgrade

Open JoakimThorne opened this issue 1 year ago • 1 comments

Hi,

Im using version "5.1.2" of knip ftm and I tried to upgrade to the latest version and found out that all of a sudden unused dependencies which were fine before. So I started downgrading the version of the lib down to 5.4.0 were it started to "work" again and report on unused dependencies. Ie between 5.4.0 and 5.5.0 something changed so these are reported as unused, when they are not.

In my knip.json I list nothing for nextjs. I used it out of the box and it have been working fine and reported correctly since. Im using the app-router. I've tried to add paths in knip.json to help it find the folders containing the missing files but it did'nt help.

So to summarize, increasing version from 5.4.0 to 5.5.0 broke default settings for my nextjs app router project.

JoakimThorne avatar Apr 06 '24 16:04 JoakimThorne

I don't see related changes that stand out for me in v5.5.0, so I'd need more details. Or even better, a reproduction.

webpro avatar Apr 07 '24 06:04 webpro

Closing due to inactivity and missing reproduction.

webpro avatar May 05 '24 06:05 webpro