pacocoursey / next-unused

Find unused files in your Next.js projects
422 stars 14 forks source link

Not working when all code is inside "src" folder #5

Closed hacktisch closed 3 years ago

hacktisch commented 3 years ago

I am using the Next.js setup where all my code is inside "src" as described in https://nextjs.org/docs/advanced-features/src-directory

Next-unused only works if you have the /pages folder in root. Resulting in below error:

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '.../pages'

pacocoursey commented 3 years ago

Duplicate, will work on this as mentioned here: https://github.com/pacocoursey/next-unused/issues/1#issuecomment-640964705