sindresorhus / file-type

Detect the file type of a file, stream, or data
MIT License
3.64k stars 345 forks source link

The requested module '/node_modules/.vite/deps/file-type.js?v=74b3d8f6' does not provide an export named 'fileTypeFromBlob' #625

Closed SheldonWBM closed 7 months ago

SheldonWBM commented 7 months ago

Issue: From the browser console:

The requested module '/node_modules/.vite/deps/file-type.js?v=74b3d8f6' does not provide an export named 'fileTypeFromBlob'

Environment: Vite: 5 React: 18 Yarn: 4 with PnP modules

This issue is similar to issue #619 where the solution is vague. Is the "re-export" method compatible with Plug n' Play modules? Is the potential issue with the vite.config the way modules are optimized (i.e. optimizeDeps)? Is there a working example with Vite and Yarn PnP?

sindresorhus commented 7 months ago

This package has the correct config. The problem is with one of your tools and you should ask on their support channels instead.

LancerComet commented 4 months ago

This package has the correct config. The problem is with one of your tools and you should ask on their support channels instead.

@sindresorhus

image image