chore: read browsers.json with require#6186
Merged
Merged
Conversation
This fixes the compatibility on Vercel with Next.js when it's used in a serverless function. Next.js uses https://github.com/vercel/nft to trace down the dependencies which a serverless function is using which is currently not capable of detecting the browsers.json in our current setup. Previously we used require to load the browers.json which was replaced by readFileSync in microsoft#5318. Since then it was broken. Fixes microsoft#5862
c8776f3 to
041a48b
Compare
aslushnikov
approved these changes
Apr 19, 2021
|
Unfortunately, this fix no longer works. It seems like bigger changes would need to be made in order for the One of the NFT maintainers has provided more info about this at vercel/nft#211. |
Contributor
Author
|
Interesting, maybe adding a special case would work for us? https://github.com/vercel/nft/blob/main/src/utils/special-cases.ts |
|
Try to set the interface for playwright with electron, but the prompt after introduction fails to find browsers.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the compatibility on Vercel with Next.js when it's used in
a serverless function.
Next.js uses https://github.com/vercel/nft to trace down the
dependencies which a serverless function is using which
is currently not capable of detecting the browsers.json in our current
setup. Previously we used
requireto load the browers.json which wasreplaced by
readFileSyncin #5318. Since then it was broken.requirehas not much down-sides except its caching which in our-caseshould not have any side-effects.
Without that it caused a
Error: ENOENT: no such file or directory, open '/var/task/node_modules/playwright-core/browsers.json'.Fixes #5862