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

NextJs Support #522

Closed
codecube47 opened this issue Jan 10, 2022 · 3 comments
Closed

NextJs Support #522

codecube47 opened this issue Jan 10, 2022 · 3 comments

Comments

@codecube47
Copy link

Tried to use it on the next js, any Idea how to fix this.

./pages/test.js:45:0
Module not found: Package path ./browser is not exported from package /Users/nilanga/Development/office/nft-auction/node_modules/file-type (see exports field in /Users/nilanga/Development/office/nft-auction/node_modules/file-type/package.json)
  43 | 
  44 | import { useState } from 'react';
> 45 | import {fileTypeFromStream} from 'file-type/browser';
@sindresorhus
Copy link
Owner

Please read the release notes when you upgrade a package: https://github.com/sindresorhus/file-type/releases/tag/v17.0.0

@codecube47
Copy link
Author

codecube47 commented Jan 10, 2022

Thanks for the quick replay

But I tried this no luck

import {fileTypeFromBuffer} from 'file-type'

my version "file-type": "^17.1.1",

node:buffer Module build failed: UnhandledSchemeError: Reading from "node:buffer" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs.

@Borewit
Copy link
Collaborator

Borewit commented Jan 10, 2022

Please check issue #502 @vusaalab.

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

3 participants