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

Module not found: Can't resolve '../build/Release/xxhash' #118

Open
isaced opened this issue Feb 17, 2024 · 1 comment
Open

Module not found: Can't resolve '../build/Release/xxhash' #118

isaced opened this issue Feb 17, 2024 · 1 comment

Comments

@isaced
Copy link

isaced commented Feb 17, 2024

 ⨯ ./node_modules/lz4/lib/utils.js:4:10
Module not found: Can't resolve '../build/Release/xxhash'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/lz4/lib/static.js
./node_modules/lz4/lib/lz4.js
./node_modules/@alicloud/gateway-sls-util/dist/client.js
./node_modules/@alicloud/gateway-sls/dist/client.js
./node_modules/@alicloud/sls20201230/dist/client.js
./lib/sls.ts
 ⨯ ./node_modules/lz4/lib/utils.js:4:10
Module not found: Can't resolve '../build/Release/xxhash'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/lz4/lib/static.js
./node_modules/lz4/lib/lz4.js
./node_modules/@alicloud/gateway-sls-util/dist/client.js
./node_modules/@alicloud/gateway-sls/dist/client.js
./node_modules/@alicloud/sls20201230/dist/client.js
./lib/sls.ts

ENV:

  • lz4: v0.6.5
  • node: v20.10.0
  • npm: 10.2.3
@RoboCafaz
Copy link

RoboCafaz commented Mar 7, 2024

Check your node_modules/lz4/build/Release folder. You should see an lz4.node and xxhash.node file in there. If not, try re-running npm install or yarn install.

You'll need to make sure whatever is running the environment recognizes those files as modules. For example, with jest you have to add node to the moduleFileExtensions list.

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

2 participants