Skip to content

Sentry Express Not Instrumented Due to Import Order with esbuild #566

@mokone91

Description

@mokone91

Hi! i cant make sentry work..
I getting warning '[Sentry] express is not instrumented. This is likely because you required/imported express before calling' in deployed lambda logs

My handler.js looks like this

import './sentry';
import serverless from 'serverless-http';

import app from './app.js';

export const handler = serverless(app);

but seems esbuild change import order during build

is there any way to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions