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

Fix withSourceMaps is not a function #20643

Merged
merged 3 commits into from
Dec 31, 2020
Merged

Fix withSourceMaps is not a function #20643

merged 3 commits into from
Dec 31, 2020

Conversation

lharries
Copy link
Contributor

In order to get this example working, I needed to remove the invocation as described here: vercel/next-plugins#309 (comment)

@ijjk ijjk added the examples Issue/PR related to examples label Dec 31, 2020
@vercel vercel bot temporarily deployed to Preview December 31, 2020 12:28 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 31, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary lharries/next.js patch-2 Change
buildDuration 11s 10.9s -106ms
nodeModulesSize 83 MB 83 MB
Page Load Tests Overall increase ✓
vercel/next.js canary lharries/next.js patch-2 Change
/ failed reqs 0 0
/ total time (seconds) 2.25 2.185 -0.06
/ avg req/sec 1110.96 1144.25 +33.29
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.384 1.346 -0.04
/error-in-render avg req/sec 1806.42 1857.4 +50.98
Client Bundles (main, webpack, commons)
vercel/next.js canary lharries/next.js patch-2 Change
677f882d2ed8..8a8f.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-5b13c61..eaca.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.1 kB 59.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lharries/next.js patch-2 Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary lharries/next.js patch-2 Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary lharries/next.js patch-2 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary lharries/next.js patch-2 Change
index.html gzip 616 B 616 B
link.html gzip 622 B 622 B
withRouter.html gzip 610 B 610 B
Overall change 1.85 kB 1.85 kB

Serverless Mode
General
vercel/next.js canary lharries/next.js patch-2 Change
buildDuration 12.8s 13.3s ⚠️ +506ms
nodeModulesSize 83 MB 83 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary lharries/next.js patch-2 Change
677f882d2ed8..8a8f.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-5b13c61..eaca.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.1 kB 59.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lharries/next.js patch-2 Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary lharries/next.js patch-2 Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary lharries/next.js patch-2 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary lharries/next.js patch-2 Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.17 MB 5.17 MB
Commit: ad773a3

@kachkaev
Copy link
Contributor

There no more need for that plugin in the example – you can remove it from deps and try setting productionBrowserSourceMaps: true in next.config.js.

Note #20500 (which does not break the example, just makes the contents of the source maps not as useful as it should be).

@lharries
Copy link
Contributor Author

lharries commented Dec 31, 2020

@kachkaev thanks for the pointer!

Would #20500 explain why the Sentry error trace refers to the chunks rather than the original files? Or is this likely a separate problem? (The source maps are in Sentry as an artifact attached to the release but they don't seem to be being used)

image

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example should be updated to remove @zeit/next-source-maps instead, please!

@kachkaev
Copy link
Contributor

@lharries what you see on the above screenshot can be explained by #20500. You can ignore the lack of the real source for now and assume the source maps will show the correct code once that bug is fixed.

@lharries lharries force-pushed the patch-2 branch 2 times, most recently from 33c9a89 to 00da735 Compare December 31, 2020 20:03
…rceMaps

removed the `withSourceMaps` package and changed to use `productionBrowserSourceMaps: true`
@lharries
Copy link
Contributor Author

lharries commented Dec 31, 2020

Thanks @kachkaev - I'll subscribe to #20500.

@Timer I've updated the PR to remove @zeit/next-source-maps.

Fyi: when manually inspecting the build files after running npm run build on this repo, I can see the .map files for the chunks but not for any of the files in server/. I guess this is also related to #20500.

@ijjk
Copy link
Member

ijjk commented Dec 31, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary lharries/next.js patch-2 Change
buildDuration 9.7s 10.1s ⚠️ +369ms
nodeModulesSize 83 MB 83 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary lharries/next.js patch-2 Change
/ failed reqs 0 0
/ total time (seconds) 1.927 1.997 ⚠️ +0.07
/ avg req/sec 1297.36 1251.85 ⚠️ -45.51
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.176 1.178 0
/error-in-render avg req/sec 2126.24 2122.73 ⚠️ -3.51
Client Bundles (main, webpack, commons)
vercel/next.js canary lharries/next.js patch-2 Change
677f882d2ed8..2428.js gzip 12.9 kB 12.9 kB
framework.HASH.js gzip 39 kB 39 kB
main-212f85f..f23b.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.2 kB 59.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lharries/next.js patch-2 Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary lharries/next.js patch-2 Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary lharries/next.js patch-2 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary lharries/next.js patch-2 Change
index.html gzip 617 B 617 B
link.html gzip 622 B 622 B
withRouter.html gzip 610 B 610 B
Overall change 1.85 kB 1.85 kB

Serverless Mode
General
vercel/next.js canary lharries/next.js patch-2 Change
buildDuration 11.6s 11.5s -131ms
nodeModulesSize 83 MB 83 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary lharries/next.js patch-2 Change
677f882d2ed8..2428.js gzip 12.9 kB 12.9 kB
framework.HASH.js gzip 39 kB 39 kB
main-212f85f..f23b.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.2 kB 59.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lharries/next.js patch-2 Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary lharries/next.js patch-2 Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary lharries/next.js patch-2 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary lharries/next.js patch-2 Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.17 MB 5.17 MB
Commit: 35f66cc

@ijjk
Copy link
Member

ijjk commented Dec 31, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary lharries/next.js patch-2 Change
buildDuration 8.7s 8.7s ⚠️ +55ms
nodeModulesSize 83 MB 83 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary lharries/next.js patch-2 Change
/ failed reqs 0 0
/ total time (seconds) 1.748 1.778 ⚠️ +0.03
/ avg req/sec 1430.34 1405.97 ⚠️ -24.37
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.096 1.092 0
/error-in-render avg req/sec 2281.44 2288.37 +6.93
Client Bundles (main, webpack, commons)
vercel/next.js canary lharries/next.js patch-2 Change
677f882d2ed8..2428.js gzip 12.9 kB 12.9 kB
framework.HASH.js gzip 39 kB 39 kB
main-212f85f..f23b.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.2 kB 59.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lharries/next.js patch-2 Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary lharries/next.js patch-2 Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary lharries/next.js patch-2 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary lharries/next.js patch-2 Change
index.html gzip 617 B 617 B
link.html gzip 622 B 622 B
withRouter.html gzip 610 B 610 B
Overall change 1.85 kB 1.85 kB

Serverless Mode
General
vercel/next.js canary lharries/next.js patch-2 Change
buildDuration 10.3s 10.4s ⚠️ +73ms
nodeModulesSize 83 MB 83 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary lharries/next.js patch-2 Change
677f882d2ed8..2428.js gzip 12.9 kB 12.9 kB
framework.HASH.js gzip 39 kB 39 kB
main-212f85f..f23b.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.2 kB 59.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lharries/next.js patch-2 Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary lharries/next.js patch-2 Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary lharries/next.js patch-2 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary lharries/next.js patch-2 Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.17 MB 5.17 MB
Commit: 51e383b

@kodiakhq kodiakhq bot merged commit 16d464c into vercel:canary Dec 31, 2020
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants