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

Cannot find module '@node-rs/xxhash-linux-x64-gnu' #668

Closed
nephix opened this issue Sep 13, 2022 · 3 comments
Closed

Cannot find module '@node-rs/xxhash-linux-x64-gnu' #668

nephix opened this issue Sep 13, 2022 · 3 comments

Comments

@nephix
Copy link

nephix commented Sep 13, 2022

In our GH action workflow we run unit test usings swc-node and jest.

While locally everything works as expected, in CI we always get:

Error: Cannot find module '@node-rs/xxhash-linux-x64-gnu'
Require stack:
- /home/runner/work/boilerplate/boilerplate/node_modules/@node-rs/xxhash/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/@swc-node/jest/lib/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-util/build/requireOrImportModule.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-util/build/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-config/build/getCacheDirectory.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-config/build/Defaults.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-config/build/normalize.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-config/build/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-cli/build/init/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-cli/build/cli/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-cli/build/index.js
- /home/runner/work/boilerplate/boilerplate/node_modules/jest-cli/bin/jest.js
- /home/runner/work/boilerplate/boilerplate/apps/server/node_modules/jest/bin/jest.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/boilerplate/boilerplate/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:[18](https://github.com/blackhorne/boilerplate/actions/runs/3045814185/jobs/4907840519#step:12:19))
    at Object.<anonymous> (/home/runner/work/boilerplate/boilerplate/node_modules/@node-rs/xxhash/index.js:162:31)
    at Module._compile (node:internal/modules/cjs/loader:11[26](https://github.com/blackhorne/boilerplate/actions/runs/3045814185/jobs/4907840519#step:12:27):14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Object.require.extensions.<computed> [as .js] (/home/runner/work/boilerplate/boilerplate/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1004:[32](https://github.com/blackhorne/boilerplate/actions/runs/3045814185/jobs/4907840519#step:12:33))

It seems like a napi-v3 binding issue, is there a way to reinstall them explicitly?

@Brooooooklyn
Copy link
Member

Do you use the npm client? Maybe relate to this npm/cli#4828

@nephix
Copy link
Author

nephix commented Sep 13, 2022

Yes we use npm ci (but also tried npm install to see if that changes anything)

@nephix
Copy link
Author

nephix commented Sep 13, 2022

Ok I removed our package-lock.json and ran npm install again.

Seems to work now 🤷‍♂️

@nephix nephix closed this as completed Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants