Sourcemap bundled 0 files for upload (typescript & nextjs)
See original GitHub issueLooking to debug what’s going wrong here;
We’re using next and typescript. Also using @zeit/next-source-maps
to compile sourcemaps (by default it sets devtools: source-map
:
Output:
Creating an optimized production build ...> Rewriting sources
> Adding source map references
> Bundled 0 files for upload
> Uploaded release files to Sentry
> File upload complete
Source Map Upload Report
Creating an optimized production build .> Rewriting sources
> Adding source map references
> Bundled 0 files for upload
> Uploaded release files to Sentry
> File upload complete
Creating an optimized production build .
Source Map Upload Report
Creating an optimized production build
Seems like 0 files are being bundled here
webpack config:
const withSourceMaps = require('@zeit/next-source-maps');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.BUNDLE_ANALYZE === '1',
});
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
module.exports = withBundleAnalyzer({
...withSourceMaps({
webpack(config, options) {
...
if (process.env.SENTRY_RELEASE === '1') {
config.plugins.push(
new SentryWebpackPlugin({
include: '.',
ignore: [
'.sentrycli',
'node_modules',
'public',
'styles',
'*.config.js',
'next.config.runtime.js',
'utils/external/FullStory/loadFullStory.js',
],
}),
);
}
return config;
},
}),
...
});
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
...
"sourceMap": true,
"inlineSources": true,
"sourceRoot": "/",
"baseUrl": ".",
"typeRoots": ["./node_modules/@types", "./types/"],
"paths": {
"~/*": ["./*"]
},
...
},
"include": ["./**/*"],
"exclude": [".next/**/*", "server/**/*", "node_modules/**/*"]
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Troubleshooting Source Maps for Next.js
When uploading artifacts to Sentry, you must name your source map files with the value the file resolves to. That is, if your...
Read more >Advanced Features: Source Maps | Next.js
Enables browser source map generation during the production build. ... the source maps will be output in the same directory as the JavaScript...
Read more >Bundle Typescript files from dependent module for debugging ...
js and I want to be able to debug it (either in Chrome Dev Tools or in Intellij). I'm trying to bundle TS...
Read more >Source Maps - Rollbar Docs
Upload Option 2: Let Rollbar automatically download your source map file ... if (trace && trace.frames) { for (var i = 0; i...
Read more >file-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Perfect!
@kamilogorek I think the path should at least be decoded before the service tries to match it with the source files. I submitted https://github.com/getsentry/sentry/issues/19713 for that. Thank you for your support!