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

Use resolveRequest to compare symlinks, rather than fs.realpathSync (fix pnpm on Vercel) #20949

Closed
wants to merge 2 commits into from

Conversation

elliottsj
Copy link
Contributor

Ported from #16369

This fixes #20948 by avoiding the error:

Error: ENOENT: no such file or directory, lstat '/vercel/workpath0/app/url'
--
15:28:10.448 | at realpathSync (fs.js:1643:7)
15:28:10.448 | at handleExternals (/vercel/workpath0/app/node_modules/.pnpm/next@10.0.5_react-dom@17.0.1+react@17.0.1/node_modules/next/dist/build/webpack-config.js:66:21)

@ijjk
Copy link
Member

ijjk commented Jan 10, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary elliottsj/next.js resolve-request Change
buildDuration 10.2s 10.4s ⚠️ +111ms
nodeModulesSize 80.9 MB 80.9 MB ⚠️ +7.96 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary elliottsj/next.js resolve-request Change
/ failed reqs 0 0
/ total time (seconds) 1.975 1.969 -0.01
/ avg req/sec 1265.55 1269.88 +4.33
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.226 1.271 ⚠️ +0.04
/error-in-render avg req/sec 2038.85 1966.49 ⚠️ -72.36
Client Bundles (main, webpack, commons)
vercel/next.js canary elliottsj/next.js resolve-request Change
677f882d2ed8..89aa.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-dba4ec1..27c0.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary elliottsj/next.js resolve-request Change
polyfills-81..14d7.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary elliottsj/next.js resolve-request Change
_app-b6fc6bc..222c.js gzip 1.28 kB 1.28 kB
_error-e2ffa..0f3f.js gzip 3.46 kB 3.46 kB
hooks-010c20..8411.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-d979103..c5ff.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary elliottsj/next.js resolve-request Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary elliottsj/next.js resolve-request Change
index.html gzip 614 B 614 B
link.html gzip 619 B 619 B
withRouter.html gzip 606 B 606 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary elliottsj/next.js resolve-request Change
buildDuration 12.1s 12.1s ⚠️ +35ms
nodeModulesSize 80.9 MB 80.9 MB ⚠️ +7.96 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary elliottsj/next.js resolve-request Change
677f882d2ed8..89aa.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-dba4ec1..27c0.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary elliottsj/next.js resolve-request Change
polyfills-81..14d7.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary elliottsj/next.js resolve-request Change
_app-b6fc6bc..222c.js gzip 1.28 kB 1.28 kB
_error-e2ffa..0f3f.js gzip 3.46 kB 3.46 kB
hooks-010c20..8411.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-d979103..c5ff.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary elliottsj/next.js resolve-request Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles
vercel/next.js canary elliottsj/next.js resolve-request 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.18 MB 5.18 MB
Commit: 06b8e96

@merceyz
Copy link
Contributor

merceyz commented Jan 10, 2021

In #19518 this function is removed and replaced with require.resolve which probably makes this unnecessary

@elliottsj
Copy link
Contributor Author

@merceyz Awesome. Looks like your PR was merged; I'll test it out soon to see if the issue is resolved.

@elliottsj
Copy link
Contributor Author

Appears to be fixed 🎉

@elliottsj elliottsj closed this Jan 11, 2021
@elliottsj elliottsj deleted the resolve-request branch January 11, 2021 19:27
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENOENT build error with Vercel + pnpm
3 participants