-
Notifications
You must be signed in to change notification settings - Fork 98
Module not found: Can't resolve '../build/Release/xxhash' #118
Comments
Check your You'll need to make sure whatever is running the environment recognizes those files as modules. For example, with jest you have to add |
Y'all ever get any further with this? @RoboCafaz, @isaced struggling with the same issue. I even tried wrapping some of the stuff manually and had no luck. |
@Tukajo you can try this: const nextConfig = {
output: "standalone",
experimental: {
serverComponentsExternalPackages: ["lz4"], // <-add this
},
};
export default nextConfig; |
@isaced thanks for the suggestion! I'm actually just using a regular nodejs env. Trying to basically bundle an aws lambda. So no nextjs involved unfortunately. |
@Andriy-Kulak I went down a deep deep rabbithole that lead me to a circular series of threads where people were in a stalemate on resolving this. Some folks were essentially arguing that this will not be implemented, since the new node fetch does not resolve local file URIs anymore as of the latest node versions. They refused to do it because various fetch specs from WinterCG specify that "file resolving" is left up to the reader as exercise see: I don't personally agree with this argument all that much since honestly it is surprising to me that node would allow file fetching up until now and basically break a ton of functionality. I don't know who's "problem" this is to fix. Since there is this stalemate, and lz4 mostly relies on fetch resolving local wasm files for lz4, I don't foresee any fix any time soon. I moved on to using different compression algorithms for my work that did not rely on local file fetching, or had out-of-the-box support for file fetching. My use-case was identical to yours, this was lambda code. Sorry I couldn't help more. |
ENV:
The text was updated successfully, but these errors were encountered: