DavidSouther / ailly

Your AI Writing Ally
Other
9 stars 6 forks source link

Switch package for checking filetype. #153

Closed cpyle0819 closed 2 months ago

cpyle0819 commented 2 months ago

The previous package, mime-type, was too narrowly focused. The istextorbinary package broadly covers a large list of file extensions.

cpyle0819 commented 2 months ago

Tests are failing during build of the Next.js app.

../core/lib/content/gitignore_fs.js
Module not found: Default condition should be last one

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../core/lib/index.js
./src/app/ailly.ts
../node_modules/next/dist/build/webpack/loaders/next-flight-action-entry-loader.js?actions=%5B%5B%22%2FUsers%2Fcorepyle%2FDocuments%2Frepos%2Failly%2Fweb%2Fsrc%2Fapp%2Failly.ts%22%2C%5B%22generateOne%22%5D%5D%5D&__client_imported__=true!

The current working theory is that istextorbinary is being loaded as a Node only module. https://nextjs.org/docs/messages/module-not-found#the-module-youre-trying-to-import-uses-nodejs-specific-modules