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] set platform to neutral when calling esbuild #8083

Merged
merged 3 commits into from
Dec 12, 2022
Merged

Conversation

benmccann
Copy link
Member

closes #8082

@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2022

🦋 Changeset detected

Latest commit: 0f94998

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@sveltejs/adapter-cloudflare Patch
@sveltejs/adapter-cloudflare-workers Patch
@sveltejs/adapter-netlify Patch
@sveltejs/adapter-vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dominikg
Copy link
Member

dominikg commented Dec 12, 2022

I believe this change still makes sense even after the other fix. esbuild should not assume browser by itself, changing the default from 'neutrail' to 'browser' was done in esbuild 0.16 which we recently updated to to align with vite-4.

Like discussed elsewhere it should be applied to all adapters using esbuild, not just cf's

@Rich-Harris Rich-Harris merged commit ee7cd45 into master Dec 12, 2022
@Rich-Harris Rich-Harris deleted the cloudflare branch December 12, 2022 15:03
@wiesson
Copy link
Contributor

wiesson commented Dec 13, 2022

Is this change applied to @sveltejs/adapter-vercel as well? I have noticed that my vercel builds are failing when upgrading von v85 to v86

@benmccann benmccann changed the title [fix] set platform to neutral for cloudflare build [fix] set platform to neutral when calling esbuild Dec 13, 2022
@benmccann
Copy link
Member Author

Yes, this PR does affect Vercel. Can you give more details such as the error message and library that's failing and ideally provide a project that reproduces the failure?

@wiesson
Copy link
Contributor

wiesson commented Dec 13, 2022

Yes, sure! I just haven't had the time to create a bug ticket 😞

The error looks like that (Using node 18 with vercel, if that matters)

Error log

✘ [ERROR] Could not resolve "stream"
--
10:27:57.167 |  
10:27:57.167 | node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.mjs:1:19:
10:27:57.167 | 1 │ import Stream from 'stream';
10:27:57.167 |~~~~~~~~
10:27:57.167 |  
10:27:57.167 | The package "stream" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.168 |  
10:27:57.168 | ✘ [ERROR] Could not resolve "http"
10:27:57.168 |  
10:27:57.168 | node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.mjs:2:17:
10:27:57.169 | 2 │ import http from 'http';
10:27:57.169 | ╵                  ~~~~~~
10:27:57.169 |  
10:27:57.169 | The package "http" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.169 |  
10:27:57.169 | ✘ [ERROR] Could not resolve "url"
10:27:57.169 |  
10:27:57.169 | node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.mjs:3:16:
10:27:57.169 | 3 │ import Url from 'url';
10:27:57.169 |~~~~~
10:27:57.170 |  
10:27:57.170 | The package "url" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.170 |  
10:27:57.170 | ✘ [ERROR] Could not resolve "https"
10:27:57.170 |  
10:27:57.170 | node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.mjs:5:18:
10:27:57.170 | 5 │ import https from 'https';
10:27:57.170 | ╵                   ~~~~~~~
10:27:57.170 |  
10:27:57.170 | The package "https" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.170 |  
10:27:57.170 | ✘ [ERROR] Could not resolve "zlib"
10:27:57.170 |  
10:27:57.170 | node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.mjs:6:17:
10:27:57.170 | 6 │ import zlib from 'zlib';
10:27:57.170 |~~~~~~
10:27:57.170 |  
10:27:57.170 | The package "zlib" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.170 |  
10:27:57.199 | ✘ [ERROR] Could not resolve "util"
10:27:57.199 |  
10:27:57.199 | node_modules/.pnpm/object-inspect@1.12.2/node_modules/object-inspect/util.inspect.js:1:25:
10:27:57.199 | 1 │ module.exports = require('util').inspect;
10:27:57.199 | ╵                          ~~~~~~
10:27:57.199 |  
10:27:57.199 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.200 |  
10:27:57.203 | ✘ [ERROR] Could not resolve "util"
10:27:57.203 |  
10:27:57.203 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketServer.js:19:19:
10:27:57.203 | 19 │ var util = require('util');
10:27:57.204 |~~~~~~
10:27:57.204 |  
10:27:57.204 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.204 |  
10:27:57.204 | ✘ [ERROR] Could not resolve "events"
10:27:57.204 |  
10:27:57.205 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketServer.js:21:27:
10:27:57.205 | 21 │ var EventEmitter = require('events').EventEmitter;
10:27:57.205 | ╵                            ~~~~~~~~
10:27:57.205 |  
10:27:57.205 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.206 |  
10:27:57.206 | ✘ [ERROR] Could not resolve "util"
10:27:57.206 |  
10:27:57.206 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketClient.js:19:19:
10:27:57.206 | 19 │ var util = require('util');
10:27:57.206 |~~~~~~
10:27:57.206 |  
10:27:57.207 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.207 |  
10:27:57.207 | ✘ [ERROR] Could not resolve "events"
10:27:57.207 |  
10:27:57.207 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketClient.js:20:27:
10:27:57.207 | 20 │ var EventEmitter = require('events').EventEmitter;
10:27:57.207 | ╵                            ~~~~~~~~
10:27:57.207 |  
10:27:57.207 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.207 |  
10:27:57.207 | ✘ [ERROR] Could not resolve "http"
10:27:57.207 |  
10:27:57.207 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketClient.js:21:19:
10:27:57.207 | 21 │ var http = require('http');
10:27:57.207 |~~~~~~
10:27:57.208 |  
10:27:57.208 | The package "http" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.208 |  
10:27:57.208 | ✘ [ERROR] Could not resolve "https"
10:27:57.208 |  
10:27:57.208 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketClient.js:22:20:
10:27:57.208 | 22 │ var https = require('https');
10:27:57.208 | ╵                     ~~~~~~~
10:27:57.208 |  
10:27:57.208 | The package "https" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.208 |  
10:27:57.208 | ✘ [ERROR] Could not resolve "url"
10:27:57.208 |  
10:27:57.208 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketClient.js:23:18:
10:27:57.209 | 23 │ var url = require('url');
10:27:57.209 |~~~~~
10:27:57.209 |  
10:27:57.209 | The package "url" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.209 |  
10:27:57.209 | ✘ [ERROR] Could not resolve "crypto"
10:27:57.209 |  
10:27:57.209 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketClient.js:24:21:
10:27:57.209 | 24 │ var crypto = require('crypto');
10:27:57.209 | ╵                      ~~~~~~~~
10:27:57.209 |  
10:27:57.209 | The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.209 |  
10:27:57.209 | ✘ [ERROR] Could not resolve "util"
10:27:57.209 |  
10:27:57.209 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketConnection.js:17:19:
10:27:57.209 | 17 │ var util = require('util');
10:27:57.210 |~~~~~~
10:27:57.210 |  
10:27:57.210 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.210 |  
10:27:57.210 | ✘ [ERROR] Could not resolve "events"
10:27:57.210 |  
10:27:57.210 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketConnection.js:19:27:
10:27:57.210 | 19 │ var EventEmitter = require('events').EventEmitter;
10:27:57.210 | ╵                            ~~~~~~~~
10:27:57.210 |  
10:27:57.210 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.210 |  
10:27:57.211 | ✘ [ERROR] Could not resolve "crypto"
10:27:57.211 |  
10:27:57.211 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRequest.js:17:21:
10:27:57.211 | 17 │ var crypto = require('crypto');
10:27:57.211 |~~~~~~~~
10:27:57.211 |  
10:27:57.211 | The package "crypto" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.211 |  
10:27:57.212 | ✘ [ERROR] Could not resolve "util"
10:27:57.212 |  
10:27:57.212 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRequest.js:18:19:
10:27:57.212 | 18 │ var util = require('util');
10:27:57.212 | ╵                    ~~~~~~
10:27:57.212 |  
10:27:57.212 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.212 |  
10:27:57.212 | ✘ [ERROR] Could not resolve "url"
10:27:57.212 |  
10:27:57.212 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRequest.js:19:18:
10:27:57.212 | 19 │ var url = require('url');
10:27:57.212 |~~~~~
10:27:57.212 |  
10:27:57.212 | The package "url" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.212 |  
10:27:57.212 | ✘ [ERROR] Could not resolve "events"
10:27:57.212 |  
10:27:57.213 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRequest.js:20:27:
10:27:57.213 | 20 │ var EventEmitter = require('events').EventEmitter;
10:27:57.213 | ╵                            ~~~~~~~~
10:27:57.213 |  
10:27:57.213 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.213 |  
10:27:57.213 | ✘ [ERROR] Could not resolve "fs"
10:27:57.213 |  
10:27:57.213 | node_modules/.pnpm/node-gyp-build@4.5.0/node_modules/node-gyp-build/index.js:1:17:
10:27:57.213 | 1 │ var fs = require('fs')
10:27:57.213 |~~~~
10:27:57.213 |  
10:27:57.213 | The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.213 |  
10:27:57.213 | ✘ [ERROR] Could not resolve "path"
10:27:57.213 |  
10:27:57.213 | node_modules/.pnpm/node-gyp-build@4.5.0/node_modules/node-gyp-build/index.js:2:19:
10:27:57.213 | 2 │ var path = require('path')
10:27:57.213 | ╵                    ~~~~~~
10:27:57.213 |  
10:27:57.213 | The package "path" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.213 |  
10:27:57.214 | ✘ [ERROR] Could not resolve "os"
10:27:57.214 |  
10:27:57.214 | node_modules/.pnpm/node-gyp-build@4.5.0/node_modules/node-gyp-build/index.js:3:17:
10:27:57.214 | 3 │ var os = require('os')
10:27:57.214 |~~~~
10:27:57.214 |  
10:27:57.214 | The package "os" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.214 |  
10:27:57.214 | ✘ [ERROR] Could not resolve "events"
10:27:57.214 |  
10:27:57.214 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/utils.js:10:12:
10:27:57.214 | 10 │     require('events').EventEmitter.listenerCount \|\|
10:27:57.214 | ╵             ~~~~~~~~
10:27:57.214 |  
10:27:57.214 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.214 |  
10:27:57.214 | ✘ [ERROR] Could not resolve "tty"
10:27:57.214 |  
10:27:57.214 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:5:18:
10:27:57.214 | 5 │ var tty = require('tty');
10:27:57.214 |~~~~~
10:27:57.215 |  
10:27:57.215 | The package "tty" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.215 |  
10:27:57.215 | ✘ [ERROR] Could not resolve "util"
10:27:57.215 |  
10:27:57.215 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:6:19:
10:27:57.215 | 6 │ var util = require('util');
10:27:57.215 | ╵                    ~~~~~~
10:27:57.215 |  
10:27:57.215 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.215 |  
10:27:57.215 | ✘ [ERROR] Could not resolve "fs"
10:27:57.215 |  
10:27:57.215 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:186:23:
10:27:57.215 | 186 │       var fs = require('fs');
10:27:57.216 |~~~~
10:27:57.216 |  
10:27:57.216 | The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.216 |  
10:27:57.216 | ✘ [ERROR] Could not resolve "net"
10:27:57.216 |  
10:27:57.216 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:193:24:
10:27:57.216 | 193 │       var net = require('net');
10:27:57.216 | ╵                         ~~~~~
10:27:57.216 |  
10:27:57.216 | The package "net" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.216 |  
10:27:57.217 | ✘ [ERROR] Could not resolve "buffer"
10:27:57.217 |  
10:27:57.217 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/vendor/FastBufferList.js:7:21:
10:27:57.217 | 7 │ var Buffer = require('buffer').Buffer;
10:27:57.217 |~~~~~~~~
10:27:57.217 |  
10:27:57.217 | The package "buffer" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.217 |  
10:27:57.217 | ✘ [ERROR] Could not resolve "events"
10:27:57.217 |  
10:27:57.217 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/vendor/FastBufferList.js:8:27:
10:27:57.217 | 8 │ var EventEmitter = require('events').EventEmitter;
10:27:57.217 | ╵                            ~~~~~~~~
10:27:57.217 |  
10:27:57.217 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.217 |  
10:27:57.217 | ✘ [ERROR] Could not resolve "util"
10:27:57.217 |  
10:27:57.217 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/vendor/FastBufferList.js:191:8:
10:27:57.217 | 191 │ require('util').inherits(BufferList, EventEmitter);
10:27:57.217 |~~~~~~
10:27:57.218 |  
10:27:57.218 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.218 |  
10:27:57.218 | ✘ [ERROR] Could not resolve "util"
10:27:57.218 |  
10:27:57.218 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRouter.js:18:19:
10:27:57.218 | 18 │ var util = require('util');
10:27:57.218 | ╵                    ~~~~~~
10:27:57.218 |  
10:27:57.218 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.218 |  
10:27:57.218 | ✘ [ERROR] Could not resolve "events"
10:27:57.218 |  
10:27:57.218 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRouter.js:19:27:
10:27:57.218 | 19 │ var EventEmitter = require('events').EventEmitter;
10:27:57.218 |~~~~~~~~
10:27:57.218 |  
10:27:57.218 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.218 |  
10:27:57.218 | ✘ [ERROR] Could not resolve "util"
10:27:57.218 |  
10:27:57.218 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRouterRequest.js:17:19:
10:27:57.219 | 17 │ var util = require('util');
10:27:57.219 | ╵                    ~~~~~~
10:27:57.219 |  
10:27:57.219 | The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.219 |  
10:27:57.219 | ✘ [ERROR] Could not resolve "events"
10:27:57.219 |  
10:27:57.219 | node_modules/.pnpm/websocket@1.0.34/node_modules/websocket/lib/WebSocketRouterRequest.js:18:27:
10:27:57.219 | 18 │ var EventEmitter = require('events').EventEmitter;
10:27:57.219 |~~~~~~~~
10:27:57.219 |  
10:27:57.219 | The package "events" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
10:27:57.219 |  
10:27:57.317 | error during build:
10:27:57.317 | Error: Build failed with 35 errors:
10:27:57.317 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:5:18: ERROR: Could not resolve "tty"
10:27:57.317 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:6:19: ERROR: Could not resolve "util"
10:27:57.317 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:186:23: ERROR: Could not resolve "fs"
10:27:57.317 | node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js:193:24: ERROR: Could not resolve "net"
10:27:57.317 | node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib/index.mjs:1:19: ERROR: Could not resolve "stream"
10:27:57.317 | ...
10:27:57.318 | at failureErrorWithLog (/vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:1591:15)
10:27:57.318 | at /vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:1047:28
10:27:57.318 | at /vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:992:67
10:27:57.318 | at buildResponseToResult (/vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:1045:7)
10:27:57.318 | at /vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:1157:14
10:27:57.318 | at responseCallbacks.<computed> (/vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:694:9)
10:27:57.318 | at handleIncomingPacket (/vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:749:9)
10:27:57.318 | at Socket.readFromStdout (/vercel/path0/node_modules/.pnpm/esbuild@0.16.4/node_modules/esbuild/lib/main.js:670:7)
10:27:57.318 | at Socket.emit (node:events:513:28)
10:27:57.318 | at Socket.emit (node:domain:489:12)
10:27:57.360 | Error: Command "vite build" exited with 1

I have pinned my version to v85 so everything works. I assumed that the error is node-fetch related but I'm not sure

Legend: production dependency, optional only, dev only

my-lovely-sveltekit-app@0.0.0 /Users/wiese/Dev/tm/lovely-sveltekit-app

dependencies:
@supabase/auth-helpers-sveltekit 0.8.6
├─┬ @supabase/auth-helpers-shared 0.2.3
│ └─┬ @supabase/supabase-js 2.1.4 peer
│   ├─┬ @supabase/functions-js 2.0.0
│   │ └─┬ cross-fetch 3.1.5
│   │   └── node-fetch 2.6.7
│   ├─┬ @supabase/gotrue-js 2.5.0
│   │ └─┬ cross-fetch 3.1.5
│   │   └── node-fetch 2.6.7
│   ├─┬ @supabase/postgrest-js 1.1.0
│   │ └─┬ cross-fetch 3.1.5
│   │   └── node-fetch 2.6.7
│   ├─┬ @supabase/storage-js 2.1.0
│   │ └─┬ cross-fetch 3.1.5
│   │   └── node-fetch 2.6.7
│   └─┬ cross-fetch 3.1.5
│     └── node-fetch 2.6.7
└─┬ @supabase/supabase-js 2.1.4 peer
  ├─┬ @supabase/functions-js 2.0.0
  │ └─┬ cross-fetch 3.1.5
  │   └── node-fetch 2.6.7
  ├─┬ @supabase/gotrue-js 2.5.0
  │ └─┬ cross-fetch 3.1.5
  │   └── node-fetch 2.6.7
  ├─┬ @supabase/postgrest-js 1.1.0
  │ └─┬ cross-fetch 3.1.5
  │   └── node-fetch 2.6.7
  ├─┬ @supabase/storage-js 2.1.0
  │ └─┬ cross-fetch 3.1.5
  │   └── node-fetch 2.6.7
  └─┬ cross-fetch 3.1.5
    └── node-fetch 2.6.7
@supabase/supabase-js 2.1.4
├─┬ @supabase/functions-js 2.0.0
│ └─┬ cross-fetch 3.1.5
│   └── node-fetch 2.6.7
├─┬ @supabase/gotrue-js 2.5.0
│ └─┬ cross-fetch 3.1.5
│   └── node-fetch 2.6.7
├─┬ @supabase/postgrest-js 1.1.0
│ └─┬ cross-fetch 3.1.5
│   └── node-fetch 2.6.7
├─┬ @supabase/storage-js 2.1.0
│ └─┬ cross-fetch 3.1.5
│   └── node-fetch 2.6.7
└─┬ cross-fetch 3.1.5
  └── node-fetch 2.6.7

devDependencies:
@sveltejs/adapter-vercel 1.0.0-next.85
└─┬ @vercel/nft 0.22.5
  └─┬ @mapbox/node-pre-gyp 1.0.10
    └── node-fetch 2.6.7

Rich-Harris added a commit that referenced this pull request Dec 13, 2022
dummdidumm pushed a commit that referenced this pull request Dec 13, 2022
This reverts commit ee7cd45.

Reverts #8083. Turns out this was a mistake, since it breaks packages like cross-fetch which assume that if you're not resolving browser modules, you want the Node version instead.

Since we bundle esm-env, the original reason for #8083 no longer applies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

browser value from $app/environment shows the wrong value in the server environment
4 participants