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

"bun run" crash: Column must be greater than or equal to 0, got -1 #18250

Open
Scalahansolo opened this issue Mar 17, 2025 · 1 comment
Open
Labels
atw bug Something isn't working

Comments

@Scalahansolo
Copy link

What version of Bun is running?

1.2.5

What platform is your computer?

Darwin 24.3.0 arm64 arm

What steps can reproduce the bug?

Attempted to run our companies primary production app with bun run dist/main.js today and got the error below. Seems to be somehow related to source-map-support

Running node dist/main.js has no such issue.

➜  backend git:(sean/backend-swc) ✗ bun run dist/main.js
583 |     if (aNeedle[aLineName] <= 0) {
584 |       throw new TypeError('Line must be greater than or equal to 1, got '
585 |                           + aNeedle[aLineName]);
586 |     }
587 |     if (aNeedle[aColumnName] < 0) {
588 |       throw new TypeError('Column must be greater than or equal to 0, got '
                  ^
TypeError: Column must be greater than or equal to 0, got -1
      at SourceMapConsumer_findMapping (/Users/sean/workspaces/motion-repos/motion/node_modules/source-map/lib/source-map-consumer.js:588:13)
      at SourceMapConsumer_originalPositionFor (/Users/sean/workspaces/motion-repos/motion/node_modules/source-map/lib/source-map-consumer.js:653:22)
      at mapSourcePosition (/Users/sean/workspaces/motion-repos/motion/node_modules/source-map-support/source-map-support.js:244:42)
      at wrapCallSite (/Users/sean/workspaces/motion-repos/motion/node_modules/source-map-support/source-map-support.js:397:20)
      at prepareStackTrace (/Users/sean/workspaces/motion-repos/motion/node_modules/source-map-support/source-map-support.js:446:39)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/node_modules/mammoth/node_modules/bluebird/js/release/util.js:250:22)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/node_modules/mammoth/node_modules/bluebird/js/release/util.js:259:49)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/node_modules/mammoth/node_modules/bluebird/js/release/promise.js:14:5)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/node_modules/mammoth/lib/promises.js:2:5)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/node_modules/mammoth/lib/docx/docx-reader.js:4:5)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/node_modules/mammoth/lib/index.js:3:5)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/packages/nest/backend/dist/services/openai/file-parsing.service.js:16:32)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/packages/nest/backend/dist/services/openai/ai.service.js:19:7)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/packages/nest/backend/dist/services/openai/openai.module.js:22:7)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/packages/nest/backend/dist/exports/services.js:50:1)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/apps/backend/dist/app.module.js:13:7)
      at <anonymous> (/Users/sean/workspaces/motion-repos/motion/apps/backend/dist/main.js:13:7)

Bun v1.2.5 (macOS arm64)

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@Scalahansolo Scalahansolo added bug Something isn't working needs triage labels Mar 17, 2025
@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Mar 17, 2025

We haven't implemented source map support through node:module yet. We do support sourcemaps internally and will automatically do sourcemaps for code transpiled by bun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
atw bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants