-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Bug]: Breaks react-router-dom #14229
Comments
Hey @cdaycmc! 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. |
I'm also seeing a similar error in Babel 7.17, but not in react-router-dom specifically. It triggers when upgrading Babel.
|
Looking into this. |
Same issue on Nuxt @ v2.15.8 Module build failed (from ./node_modules/babel-loader/lib/index.js): friendly-errors 06:24:50
TypeError: /home/project/nuxt/definitions/test/index.ts: Cannot read property 'originalPositionFor' of undefined
at SourceMapTree.originalPositionFor (/home/project/nuxt/node_modules/@ampproject/remapping/dist/remapping.umd.js:159:27)
at trace (/home/project/nuxt/node_modules/@ampproject/remapping/dist/remapping.umd.js:102:37)
at EncodedSourceMapImpl.map (/home/project/nuxt/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js:347:36)
at TraceMap.map (/home/project/nuxt/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js:430:31)
at SourceMapTree.traceMappings (/home/project/nuxt/node_modules/@ampproject/remapping/dist/remapping.umd.js:85:34)
at remapping (/home/project/nuxt/node_modules/@ampproject/remapping/dist/remapping.umd.js:258:36)
at mergeSourceMap (/home/project/nuxt/node_modules/@babel/core/lib/transformation/file/merge-map.js:19:30)
at generateCode (/home/project/nuxt/node_modules/@babel/core/lib/transformation/file/generate.js:72:39)
at run (/home/project/nuxt/node_modules/@babel/core/lib/transformation/index.js:55:33)
at run.next (<anonymous>)
at Function.transform (/home/project/nuxt/node_modules/@babel/core/lib/transform.js:25:41)
at transform.next (<anonymous>)
at step (/home/project/nuxt/node_modules/gensync/index.js:261:32)
at /home/project/nuxt/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/project/nuxt/node_modules/gensync/index.js:223:11) |
I found the bug, I'll publish a new |
Ok, v0.2.3 is published which should resolve the issue. |
confirmed, working now if you have npm 7+ all you have to do is run: @jridgewell thanks for the fast fix |
I'm closing this since it has been fixes in |
💻
How are you using Babel?
babel-loader (webpack)
Input code
npm i react-router-dom
<BrowserRouter>
Configuration file name
No response
Configuration
No response
Current and expected behavior
Fails on
npm start
Environment
Babel 7.17.0
CRA 5.0.0
react-router-dom 6.2.1
Possible solution
Revert to previous version of
@babel/core
npm i -D @babel/core@7.16.12
Additional context
No response
The text was updated successfully, but these errors were encountered: