-
Notifications
You must be signed in to change notification settings - Fork 4
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 not found: Can't resolve 'async_hooks' #51
Comments
Hi, I'm also facing the same issue after upgrading to @vercel/flags 3.1.0. I'm getting an error related to the async_hooks module: |
Do you have a reproduction you could share? Did the same code work on the earlier version? This could be due to the feature flag ending up in a client component which is not supported, or due to your an older node version. |
Seeing the same issue here. I'll try this PR or downgrade. |
const nextConfig = {
webpack: (config) => {
config.resolve = {
...config.resolve,
fallback: {
...config.resolve.fallback,
async_hooks: false,
}
}
return config;
},
// ... This seems to do the trick. |
I just published a snapshot release which uses |
Seems like it doesn't interact well with Webpack. Getting the following error:
|
Thanks for checking! Could you provide a minimal reproduction for the original issue? I still think the root cause here could be that you're using the flag in a client component. |
@dferber90 client side use is absolutely my problem as well. I know the documentation is clear about WHY server side flags are better, and I mostly agree, but living in a React/SPA means that I can have "stateless" cookie based flags that can be interrogated on the client. The docs should be clearer that this SDK can never be used on the client side if that's the intention. I didn't realize this library wasn't meant for general use yet. |
Upgrading to @vercel/flags 3.1.0 from 2.x results in this error for us:
Any way to rectify?
The text was updated successfully, but these errors were encountered: