-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
While using package with docker desktop #122
Comments
@deepakkatara you are supposed to re-install your dependencies in your docker environment |
The |
I'm getting the same issue, and I think it's because my local arch is different than the docker arch. So my "node_modules/snappy/node_modules/@napi-rs/snappy-darwin-arm64": {
"version": "7.2.2",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
}, while the Docker runtime ( |
You can remove |
I ended up adding all of the runtimes as optional dependencies, so that no matter where I'm running "optionalDependencies": {
"@napi-rs/snappy-android-arm-eabi": "~7.2.2",
"@napi-rs/snappy-android-arm64": "~7.2.2",
"@napi-rs/snappy-darwin-arm64": "~7.2.2",
"@napi-rs/snappy-darwin-x64": "~7.2.2",
"@napi-rs/snappy-freebsd-x64": "~7.2.2",
"@napi-rs/snappy-linux-arm-gnueabihf": "~7.2.2",
"@napi-rs/snappy-linux-arm64-gnu": "~7.2.2",
"@napi-rs/snappy-linux-arm64-musl": "~7.2.2",
"@napi-rs/snappy-linux-x64-gnu": "~7.2.2",
"@napi-rs/snappy-linux-x64-musl": "~7.2.2",
"@napi-rs/snappy-win32-arm64-msvc": "7.2.2",
"@napi-rs/snappy-win32-ia32-msvc": "~7.2.2",
"@napi-rs/snappy-win32-x64-msvc": "~7.2.2"
} |
HI Team,
On macOS, I use the snappy package, which is successful. however, the moment I attempt to launch the project locally using Docker Desktop, an issue occurs while starting the container-
`Error: Cannot find module '@napi-rs/snappy-linux-x64-musl'
Require stack:
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Function.wrappedResolveFilename [as _resolveFilename] (/code/node_modules/newrelic/lib/shimmer.js:291:42)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Function.wrappedLoad [as _load] (/code/node_modules/newrelic/lib/shimmer.js:307:24)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (/code/node_modules/snappy/index.js:1:2955)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/code/node_modules/snappy/index.js',
'/code/dist/server/index.js',
'/code/index.js'
]
}`
The potential problem that I see is connected to optionalDependencies because it only installs @napi-rs/snappy-darwin-x64 compatible with Mac and searches for Linux @napi-rs dependencies when I run it in a docker container.
Docker info
What could be the potential solution of this?
The text was updated successfully, but these errors were encountered: