puppeteer icon indicating copy to clipboard operation
puppeteer copied to clipboard

[Bug] Could not resolve "node:buffer"

Open vickyRathee opened this issue 1 year ago • 7 comments

Bug description

Getting error on build on Worker as well locally on Wrangler

Logs from Cloudflare Deployment

image

Logs from Wrangler

wrangler pages dev --proxy=3000 --compatibility-date=2023-09-04 --local

Error

Wrangler.toml

# Top-level configuration
name = "puppeteer"
main = "api/server.ts"
node_compat = true
workers_dev = true

browser = { binding = "MYBROWSER" }

Puppeteer version

0.0.5

Node.js version

18.17.1

npm version

10.1.0

What operating system are you seeing the problem on?

Windows

Relevant log output

16:29:00.466 | Found Functions directory at /functions. Uploading.
-- | --
16:29:01.918 | ✘ [ERROR] 3 error(s) and 0 warning(s) when compiling Worker.
16:29:01.919 |  
16:29:01.919 |  
16:29:01.922 |  
16:29:01.924 | ✘ [ERROR] Could not resolve "node:buffer"
16:29:01.924 |  
16:29:01.924 | ../node_modules/@cloudflare/puppeteer/lib/esm/puppeteer/common/Page.js:47:23:
16:29:01.924 | 47 │ import { Buffer } from 'node:buffer';
16:29:01.925 | ╵                        ~~~~~~~~~~~~~

vickyRathee avatar Sep 14 '23 11:09 vickyRathee