-
Notifications
You must be signed in to change notification settings - Fork 712
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
Module crashes webpack build due to use of new URL('./', import.meta.url) #984
Comments
Facing this issue on expo react native "expo": "~51.0.28", SyntaxError: 192689:107:'import.meta' is currently unsupported, js engine: hermes [Component Stack] |
facing this issue on next v14
⨯ ./node_modules/@huggingface/transformers/dist/transformers.js:32776:1
Module not found: Can't resolve './' |
Hi there 👋 Thanks for reporting - we're working on fixing this :) In the meantime, there is a workaround as shown here webpack(config, { isServer }) {
config.resolve.alias['@huggingface/transformers'] = path.resolve(__dirname, 'node_modules/@huggingface/transformers');
....
return config;
} |
I might have found a better solution (tested in Next.js v15): const nextConfig = {
output: "standalone",
// https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages
serverExternalPackages: ["@huggingface/transformers"],
}; Let me know if that fixes it! Demo: https://huggingface.co/spaces/webml-community/next-server-template |
System Info
transformer.js#3
Environment/Platform
Description
The dist folder of transformer.js in node_modules contains the "new URL('./', import.meta.url)", which cause a build crash for webpack:
webpack/webpack#16878
Reproduction
extension.zip
The text was updated successfully, but these errors were encountered: