Skip to content

🐛 BUG: Could not resolve "unenv/node/perf_hooks" #8411

Closed as not planned
@cumali-demir

Description

@cumali-demir

Which Cloudflare product(s) does this pertain to?

R2, Wrangler

What versions are you using?

3.114.0

What operating system and version are you using?

Mac Sonoma 14.0

Please provide a link to a minimal reproduction

No response

Describe the Bug

✘ [ERROR] Build failed with 3 errors:

  ✘ [ERROR] Could not resolve
  "unenv/node/perf_hooks"
  
  
  ../node_modules/@cloudflare/unenv-preset/dist/runtime/node/perf_hooks.mjs:11:7:
        11 │ } from "unenv/node/perf_hooks";
           ╵        ~~~~~~~~~~~~~~~~~~~~~~~
  
    The Yarn Plug'n'Play manifest forbids importing "unenv" here because it's
  not listed as a dependency of this package:
  
      ../../../.pnp.cjs:37:31:
        37 │         "packageDependencies": [\
           ╵                                ~~
  
    You can mark the path "unenv/node/perf_hooks" as external to exclude it from
  the bundle, which will remove this error.
  
  
  ✘ [ERROR] Could not resolve
  "@cloudflare/unenv-preset/node/console"
  
  
  ../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console:1:41:
        1 │ ...lt as defaultExport } from
  "@cloudflare/unenv-preset/node/console";
          ╵
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
    The Yarn Plug'n'Play manifest forbids importing "@cloudflare/unenv-preset"
  here because it's not listed as a dependency of this package:
  
      ../../../.pnp.cjs:37:31:
        37 │         "packageDependencies": [\
           ╵                                ~~
  
    You can mark the path "@cloudflare/unenv-preset/node/console" as external to
  exclude it from the bundle, which will remove this error.
  
  
  ✘ [ERROR] Could not resolve
  "@cloudflare/unenv-preset/node/process"
  
  
  ../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process:1:41:
        1 │ ...lt as defaultExport } from
  "@cloudflare/unenv-preset/node/process";
          ╵
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
    The Yarn Plug'n'Play manifest forbids importing "@cloudflare/unenv-preset"
  here because it's not listed as a dependency of this package:
  
      ../../../.pnp.cjs:37:31:
        37 │         "packageDependencies": [\
           ╵                                ~~
  
    You can mark the path "@cloudflare/unenv-preset/node/process" as external to
  exclude it from the bundle, which will remove this error.
  
  


🪵  Logs were written to "/Users/<username>/Library/Preferences/.wrangler/logs/wrangler-2025-03-09_23-54-50_676.log"
file:///<projectPath>/node_modules/hot-updater/dist/index.js:79217
        throw new Error("Failed to deploy worker", {
              ^

Error: Failed to deploy worker
    at deployWorker (file:///<projectPath>/node_modules/hot-updater/dist/index.js:79217:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async initCloudflareD1R2Worker (file:///<projectPath>/node_modules/hot-updater/dist/index.js:79401:24)
    at async Command.init_init (file:///<projectPath>/node_modules/hot-updater/dist/index.js:79661:13) {
  [cause]: ExecaError: Command failed with exit code 1: npx wrangler deploy --name hot-updater
      at getFinalError (file:///<projectPath>/node_modules/@hot-updater/cloudflare/dist/chunk-5WASCEUU.js:1474:10)
      at makeError (file:///<projectPath>/node_modules/@hot-updater/cloudflare/dist/chunk-5WASCEUU.js:3498:17)
      at getAsyncResult (file:///<projectPath>/node_modules/@hot-updater/cloudflare/dist/chunk-5WASCEUU.js:7168:159)
      at handlePromise (file:///<projectPath>/node_modules/@hot-updater/cloudflare/dist/chunk-5WASCEUU.js:7153:18)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async deployWorker (file:///<projectPath>/node_modules/hot-updater/dist/index.js:79214:9)
      at async initCloudflareD1R2Worker (file:///<projectPath>/node_modules/hot-updater/dist/index.js:79401:24)
      at async Command.init_init (file:///<projectPath>/node_modules/hot-updater/dist/index.js:79661:13) {
    shortMessage: 'Command failed with exit code 1: npx wrangler deploy --name hot-updater',
    command: 'npx wrangler deploy --name hot-updater',
    escapedCommand: 'npx wrangler deploy --name hot-updater',
    cwd: '/<projectPath>/.hot-updater',
    durationMs: 5565.61025,
    failed: true,
    timedOut: false,
    isCanceled: false,
    isGracefullyCanceled: false,
    isTerminated: false,
    isMaxBuffer: false,
    isForcefullyTerminated: false,
    exitCode: 1,
    stdio: [ undefined, undefined, undefined ],
    ipcOutput: [],
    pipedFrom: []
  }
}

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions