deploying sveltekit in cloudflare pages. I got this error Cannot use "url" when deploying to Cloud

I change @sveltejs/adapter-auto to @sveltejs/adapter-cloudflare in svelte.config.js but when I build the project I got this error. Any idea how to solve this issue?
> Using @sveltejs/adapter-cloudflare
✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/firestore/build/src/index.js:20:22:
20 │ const url_1 = require("url");
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/firestore/build/src/validate.js:19:22:
19 │ const url_1 = require("url");
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/bucket.js:17:20:
17 │ import * as fs from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/storage/build/esm/src/bucket.js:31:20:
31 │ import { URL } from 'url';
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/crc32c.js:26:33:
26 │ import { createReadStream } from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/file.js:24:20:
24 │ import * as fs from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "zlib"

node_modules/@google-cloud/storage/build/esm/src/file.js:28:22:
28 │ import * as zlib from 'zlib';
╵ ~~~~~~

Cannot use "zlib" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/storage/build/esm/src/signer.js:15:21:
15 │ import * as url from 'url';
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/transfer-manager.js:25:50:
25 │ import { createReadStream, promises as fsp } from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "querystring"

node_modules/@google-cloud/storage/build/esm/src/util.js:15:29:
15 │ import * as querystring from 'querystring';
╵ ~~~~~~~~~~~~~

Cannot use "querystring" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/storage/build/esm/src/util.js:17:21:
node_modules/teeny-request/build/src/agents.js:20:23:
20 │ const http_1 = require("http");
╵ ~~~~~~

Cannot use "http" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "https"

node_modules/teeny-request/build/src/agents.js:21:24:
21 │ const https_1 = require("https");
╵ ~~~~~~~

Cannot use "https" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/teeny-request/build/src/agents.js:23:22:
23 │ const url_1 = require("url");
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "querystring"

node_modules/teeny-request/build/src/index.js:68:27:
68 │ const qs = require('querystring');
╵ ~~~~~~~~~~~~~

Cannot use "querystring" when deploying to Cloudflare.
> Using @sveltejs/adapter-cloudflare
✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/firestore/build/src/index.js:20:22:
20 │ const url_1 = require("url");
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/firestore/build/src/validate.js:19:22:
19 │ const url_1 = require("url");
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/bucket.js:17:20:
17 │ import * as fs from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/storage/build/esm/src/bucket.js:31:20:
31 │ import { URL } from 'url';
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/crc32c.js:26:33:
26 │ import { createReadStream } from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/file.js:24:20:
24 │ import * as fs from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "zlib"

node_modules/@google-cloud/storage/build/esm/src/file.js:28:22:
28 │ import * as zlib from 'zlib';
╵ ~~~~~~

Cannot use "zlib" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/storage/build/esm/src/signer.js:15:21:
15 │ import * as url from 'url';
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "fs"

node_modules/@google-cloud/storage/build/esm/src/transfer-manager.js:25:50:
25 │ import { createReadStream, promises as fsp } from 'fs';
╵ ~~~~

Cannot use "fs" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "querystring"

node_modules/@google-cloud/storage/build/esm/src/util.js:15:29:
15 │ import * as querystring from 'querystring';
╵ ~~~~~~~~~~~~~

Cannot use "querystring" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/@google-cloud/storage/build/esm/src/util.js:17:21:
node_modules/teeny-request/build/src/agents.js:20:23:
20 │ const http_1 = require("http");
╵ ~~~~~~

Cannot use "http" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "https"

node_modules/teeny-request/build/src/agents.js:21:24:
21 │ const https_1 = require("https");
╵ ~~~~~~~

Cannot use "https" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "url"

node_modules/teeny-request/build/src/agents.js:23:22:
23 │ const url_1 = require("url");
╵ ~~~~~

Cannot use "url" when deploying to Cloudflare.


✘ [ERROR] Could not resolve "querystring"

node_modules/teeny-request/build/src/index.js:68:27:
68 │ const qs = require('querystring');
╵ ~~~~~~~~~~~~~

Cannot use "querystring" when deploying to Cloudflare.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server