Repository navigation
Closed
Labels
i: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
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 commentExpected 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
Reacted by Emanuel Hoogeveen, Dr. Sergey Pogodin and Alex
Metadata
Metadata
Assignees
Labels
i: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Activity
babel-bot commentedon Sep 1, 2020
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."
test: add regression tests for babel#12025
Revert #12014 (#12027)
JLHwung commentedon Sep 3, 2020
Fixed in
@babel/[email protected].