elastic / elastic/apm-agent-nodejs

FileNotFound while resolving package "source-map"

Open
#3,684 1 comment 0 reactions 0 assignees View on GitHub
agent-nodejs awaiting reply community
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

**Describe the bug**

Getting the following error when running this inside of a docker container:

error: FileNotFound while resolving package "source-map" from "/root/.bun/install/cache/elastic-apm-node@4.1.0/lib/load-source-map.js

The runtime is bun https://bun.sh/

server.ts
```
import apm from 'elastic-apm-node';

apm.start({
serviceName: 'service-name',
secretToken: process.env.ELASTIC_APM_ENVIRONMENT!!,
serverUrl: process.env.ELASTIC_APM_SERVER_URL!!,
environment: process.env.ELASTIC_APM_ENVIRONMENT!!
});

```
package.json
```
{
"name": "search-service",
"version": "1.0.50",
"scripts": {
"dev": "bun run --watch server.ts"
},
"dependencies": {
"@elysiajs/cors": "^0.7.1",
"@sentry/bun": "^7.74.1",
"elastic-apm-node": "^4.1.0",
"elysia": "latest",
"load-source-map": "^3.0.1"
},
"devDependencies": {
"bun-types": "^1.0.6"
},
"module": "server.ts"
}

```

**Environment (please complete the following information)**

- OS: Bun 1.0.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.