Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file-type does not work in browsers #505

Closed
steeply opened this issue Dec 7, 2021 · 4 comments
Closed

file-type does not work in browsers #505

steeply opened this issue Dec 7, 2021 · 4 comments

Comments

@steeply
Copy link

steeply commented Dec 7, 2021

I get different kinds of errors when using file-type v.17

import {fileTypeFromBlob} from 'file-type';
Error: Attempted import error: 'fileTypeFromBlob' is not exported from 'file-type'.

import {fileTypeFromStream} from 'file-type';
Error:
./node_modules/file-type/core.js
Module not found: Can't resolve 'node:buffer'

This happens on all browsers Chrome, Yandex, Safari
Judging by the Issues, the problem is not only with me.

@baiy
Copy link

baiy commented Dec 9, 2021

I have the same problem

@Borewit
Copy link
Collaborator

Borewit commented Dec 9, 2021

I think this the same issue as #502, please see my response: #502 (comment)

@jankapunkt
Copy link

I wonder why with the new versions these dependencies are introduced anyway?

@Borewit
Copy link
Collaborator

Borewit commented Dec 15, 2021

I wonder why with the new versions these dependencies are introduced anyway?

Although that statement is a bit vague, I guess you will find your answer here: #248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants