You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ботов в воркерах делать дёшево и эффективно (нет проблемы cold-start'а как в Lambda или Yandex Functions)
Что сделать?
Мигрировать с node-fetch на любую кросс-платформенную альтернативу. Другие зависимости не вызывают проблем при сборке. Код vk-io тоже не вызывает ошибок, даже с учётом импортов из ноды.
Ошибки сборки
✘ [ERROR] Could not resolve "node:fs"
node_modules/.store/fetch-blob-npm-3.2.0-28e01becfc/node_modules/fetch-blob/from.js:1:59:
1 │ import { statSync, createReadStream, promises as fs } from 'node:fs'
╵ ~~~~~~~~~
You can mark the path "node:fs" as external to exclude it from the bundle, which will remove this error.
You can mark the path "node:util" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:buffer"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/body.js:10:21:
10 │ import {Buffer} from 'node:buffer';
╵ ~~~~~~~~~~~~~
You can mark the path "node:buffer" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:util"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/headers.js:7:20:
7 │ import {types} from 'node:util';
╵ ~~~~~~~~~~~
You can mark the path "node:util" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:http"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/headers.js:8:17:
8 │ import http from 'node:http';
╵ ~~~~~~~~~~~
You can mark the path "node:http" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:http"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/index.js:9:17:
9 │ import http from 'node:http';
╵ ~~~~~~~~~~~
You can mark the path "node:http" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:https"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/index.js:10:18:
10 │ import https from 'node:https';
╵ ~~~~~~~~~~~~
You can mark the path "node:https" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:zlib"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/index.js:11:17:
11 │ import zlib from 'node:zlib';
╵ ~~~~~~~~~~~
You can mark the path "node:zlib" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:stream"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/index.js:12:52:
12 │ import Stream, {PassThrough, pipeline as pump} from 'node:stream';
╵ ~~~~~~~~~~~~~
You can mark the path "node:stream" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:buffer"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/index.js:13:21:
13 │ import {Buffer} from 'node:buffer';
╵ ~~~~~~~~~~~~~
You can mark the path "node:buffer" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:url"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/request.js:9:34:
9 │ import {format as formatUrl} from 'node:url';
╵ ~~~~~~~~~~
You can mark the path "node:url" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:util"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/request.js:10:24:
10 │ import {deprecate} from 'node:util';
╵ ~~~~~~~~~~~
You can mark the path "node:util" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "node:net"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/utils/referrer.js:1:19:
1 │ import {isIP} from 'node:net';
╵ ~~~~~~~~~~
You can mark the path "node:net" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Build failed with 15 errors:
node_modules/.store/fetch-blob-npm-3.2.0-28e01becfc/node_modules/fetch-blob/from.js:1:59: ERROR:
Could not resolve "node:fs"
node_modules/.store/fetch-blob-npm-3.2.0-28e01becfc/node_modules/fetch-blob/from.js:2:25: ERROR:
Could not resolve "node:path"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/body.js:8:34:
ERROR: Could not resolve "node:stream"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/body.js:9:42:
ERROR: Could not resolve "node:util"
node_modules/.store/node-fetch-npm-3.3.1-576511fc5a/node_modules/node-fetch/src/body.js:10:21:
ERROR: Could not resolve "node:buffer"
...
The text was updated successfully, but these errors were encountered:
Это потребует много работы, так как они напрямую завязаны на этом Node API. Так как зависимость будет уже непосредственно в под-пакетах. За примером далеко ходить не нужно, inspectable требует node:util, а это используется во всех контекстах и прикреплениях.
Зачем?
Что сделать?
node-fetch
на любую кросс-платформенную альтернативу. Другие зависимости не вызывают проблем при сборке. Код vk-io тоже не вызывает ошибок, даже с учётом импортов из ноды.Ошибки сборки
The text was updated successfully, but these errors were encountered: