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

Is there a possibility that inline source maps are broken? #2144

Closed
catamphetamine opened this issue Aug 2, 2015 · 3 comments
Closed

Is there a possibility that inline source maps are broken? #2144

catamphetamine opened this issue Aug 2, 2015 · 3 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@catamphetamine
Copy link

I have a little project of my own
https://github.com/halt-hammerzeit/react-styling

And I compile it for release like this

node_modules/.bin/babel ./source --optional runtime --out-dir ./babel-transpiled-modules --source-maps inline

And then, when I include this npm module in another project, and build the project with Webpack, it says:

[0] ./~/react-styling/babel-transpiled-modules/index.js
[0] Module build failed: Error: G:/work/cinema/node_modules/babel-loader/index.js?optional[]=runtime&stage=0!G:/work/cin
ema/node_modules/react-styling/babel-transpiled-modules/index.js: No element indexed by 1
[0]     at ArraySet_at [as at] (G:\work\cinema\node_modules\babel-core\node_modules\source-map\lib\source-map\array-set.
js:93:11)
[0]     at SourceMapConsumer_originalPositionFor [as originalPositionFor] (G:\work\cinema\node_modules\babel-core\node_m
odules\source-map\lib\source-map\source-map-consumer.js:612:36)
[0]     at SourceMapGenerator.<anonymous> (G:\work\cinema\node_modules\babel-core\node_modules\source-map\lib\source-map
\source-map-generator.js:196:45)
[0]     at Array.forEach (native)
[0]     at MappingList_forEach [as unsortedForEach] (G:\work\cinema\node_modules\babel-core\node_modules\source-map\lib\
source-map\mapping-list.js:48:19)
[0]     at SourceMapGenerator_applySourceMap [as applySourceMap] (G:\work\cinema\node_modules\babel-core\node_modules\so
urce-map\lib\source-map\source-map-generator.js:193:22)
[0]     at File.mergeSourceMap (G:\work\cinema\node_modules\babel-core\lib\transformation\file\index.js:519:26)
[0]     at File.generate (G:\work\cinema\node_modules\babel-core\lib\transformation\file\index.js:808:25)
[0]     at File.transform (G:\work\cinema\node_modules\babel-core\lib\transformation\file\index.js:631:17)
[0]     at G:\work\cinema\node_modules\babel-core\lib\transformation\pipeline.js:168:19
[0]     at File.wrap (G:\work\cinema\node_modules\babel-core\lib\transformation\file\index.js:645:16)
[0]     at Pipeline.transform (G:\work\cinema\node_modules\babel-core\lib\transformation\pipeline.js:165:17)
[0]     at transpile (G:\work\cinema\node_modules\babel-loader\index.js:12:22)
[0]     at Object.module.exports (G:\work\cinema\node_modules\babel-loader\index.js:69:12)
[0]  @ ./client/pages/layout.js 26:20-44

I googled a bit on this one and people from Mozilla say that this is source-map related: source-maps tell that there's a second one, but it's not there
mozilla/source-map#76

In my case the issue is resolved by resorting from --source-maps inline to --source-maps

I created issue in the Webpack repo, as well as here

@catamphetamine
Copy link
Author

You're free to close this issue if you think that inline source map generation is OK on your side

@sebmck
Copy link
Contributor

sebmck commented Aug 2, 2015

Can you provide some exact steps to reproduce that I can follow to get that error?

@catamphetamine
Copy link
Author

ok, I'll close it for now, because its currently too complicated.

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

2 participants