Skip to content

"Error: original.line and original.column are not numbers" after upgrading to 7.11.5 #12025

Closed

Description

@medikoo

Bug Report

Current behavior

Transpiling basic file with --source-maps option crashes as follows

$ babel index.js -o dist/index.js --source-maps
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
    at SourceMapGenerator_validateMapping [as _validateMapping] (/Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/node_modules/source-map/lib/source-map-generator.js:276:15)
    at SourceMapGenerator_addMapping [as addMapping] (/Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/node_modules/source-map/lib/source-map-generator.js:110:12)
    at /Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/lib/babel/file.js:116:17
    at Array.forEach (<anonymous>)
    at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/node_modules/source-map/lib/source-map-consumer.js:157:14)
    at buildResult (/Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/lib/babel/file.js:114:20)
    at output (/Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/lib/babel/file.js:150:22)
    at /Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/lib/babel/file.js:248:9
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/medikoo/npm-packages/@serverless/enterprise-plugin/node_modules/@babel/cli/lib/babel/file.js:86:103)

Input Code

'use strict';

// some comment

Expected behavior

Should transpile without error (as it was in v7.11.4)

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

  • Filename: .babelrc
{
  "presets": [
    ["@babel/env", {
      "targets": {
        "node": "6"
      }
    }]
  ]
}

Environment

System:
    OS: macOS 10.15.6
  Binaries:
    Node: 14.9.0 - /usr/local/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
  npmPackages:
    @babel/cli: ^7.10.5 => 7.11.5 
    @babel/core: ^7.11.4 => 7.11.5 
    @babel/preset-env: ^7.11.0 => 7.11.5 
    @babel/register: ^7.10.5 => 7.11.5 
    eslint: ^7.7.0 => 7.8.0 

Activity

  1. babel-bot commented on Sep 1, 2020

    @babel-bot
    Collaborator

    Hey @medikoo! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

    If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

  2. self-assigned this
    on Sep 1, 2020
  3. added a commit that references this issue on Sep 1, 2020
  4. JLHwung commented on Sep 3, 2020

    @JLHwung
    Contributor

    Fixed in @babel/[email protected].

  5. added
    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue
    on Dec 4, 2020
  6. locked as resolved and limited conversation to collaborators on Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

i: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions