NodeJS example with docker have node-gyp errors
- Dominant language
- Go
- Stars
- 11.7k
- Forks
- 802
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 80
Description
#### Describe the bug
U can't run node example with the provided dockerfile
#### To Reproduce
Steps to reproduce the behavior:
1. Go into any node example
2. docker compose build
3. docker compose up -d
4. check logs and
```bash
/app/node_modules/node-gyp-build/index.js:59
2024-10-22T15:15:43.328348158Z throw new Error('No native build was found for runtime=' + runtime + ' abi=' + abi + ' platform=' + platform + libc + ' arch=' + arch)
2024-10-22T15:15:43.328356404Z ^
2024-10-22T15:15:43.328359920Z
2024-10-22T15:15:43.328363557Z Error: No native build was found for runtime=node abi=131 platform=linuxglibc arch=x64
2024-10-22T15:15:43.328367214Z at load.path (/app/node_modules/node-gyp-build/index.js:59:9)
2024-10-22T15:15:43.328370250Z at load (/app/node_modules/node-gyp-build/index.js:19:30)
2024-10-22T15:15:43.328373296Z at Object. (/app/node_modules/@datadog/pprof/out/src/heap-profiler-bindings.js:44:18)
2024-10-22T15:15:43.328376792Z at Module._compile (node:internal/modules/cjs/loader:1568:14)
2024-10-22T15:15:43.328380209Z at Object..js (node:internal/modules/cjs/loader:1711:10)
2024-10-22T15:15:43.328383215Z at Module.load (node:internal/modules/cjs/loader:1328:32)
2024-10-22T15:15:43.328386251Z at Function._load (node:internal/modules/cjs/loader:1138:12)
2024-10-22T15:15:43.328389427Z at TracingChannel.traceSync (node:diagnostics_channel:315:14)
2024-10-22T15:15:43.328392442Z at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
2024-10-22T15:15:43.328395498Z at Module.require (node:internal/modules/cjs/loader:1350:12)
```
#### Expected behavior
Application starts normally
#### Environment
- Infrastructure: Fedora 40, provided dockerfile
- Deployment tool: Docker
#### Additional Context
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided Dockerfile and Docker Compose setup in a Node example, then reproduce the issue with `docker compose build` and `docker compose up -d`. Trace the node-gyp-build error involving `@datadog/pprof`; done means the application starts normally without the native-build error in the logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, node.js
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100