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

使用wrangler部署到cloudflare wokers报错 #235

Open
hyperty opened this issue Jun 6, 2023 · 1 comment
Open

使用wrangler部署到cloudflare wokers报错 #235

hyperty opened this issue Jun 6, 2023 · 1 comment

Comments

@hyperty
Copy link

hyperty commented Jun 6, 2023

X [ERROR] Could not resolve "fs/promises"

dist/server.js:9:25:
  9 │ import { readFile } from 'fs/promises';
    ╵                          ~~~~~~~~~~~~~

The package "fs/promises" 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.

X [ERROR] Could not resolve "stream/web"

dist/server.js:16:20:
  16 │ import Streams from 'stream/web';
     ╵                     ~~~~~~~~~~~~

The package "stream/web" 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.

X [ERROR] Could not resolve "async_hooks"

node_modules/.pnpm/[email protected]/node_modules/undici/lib/api/api-connect.js:4:34:
  4 │ const { AsyncResource } = require('async_hooks')
    ╵                                   ~~~~~~~~~~~~~

The package "async_hooks" 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.

X [ERROR] Could not resolve "async_hooks"

node_modules/.pnpm/[email protected]/node_modules/undici/lib/api/api-pipeline.js:14:34:
  14 │ const { AsyncResource } = require('async_hooks')
     ╵                                   ~~~~~~~~~~~~~

The package "async_hooks" 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.

@ourongxing
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants