[BUG] Error: Cannot find module './yoga.wasm'

Status Fixed / completed
Maintainer reply ✓ Yes — bogini
Activity 12 comments · opened Sep 5, 2025 · closed Sep 5, 2025
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude is breaking itself in the background (other issues mentions an Autoupdate issue)

What Should Happen?

Doesn't break itself every couple of days

Error Messages/Logs

node:internal/modules/cjs/loader:1144
  const err = new Error(message);
              ^

Error: Cannot find module './yoga.wasm'
Require stack:
- /Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Function.resolve (node:internal/modules/helpers:187:19)
    at file:///Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:685:22853
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js'
  ]
}

Node.js v20.10.0

Steps to Reproduce

  1. Install Claude
  2. Run Claude
  3. Close Claude
  4. Wait a day or so (autoupdate)
  5. Attempt to Run Claude
  6. Claude fails again.

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

1.0.106

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This is NOT a new issue but the old issue was closed before being fixed.
https://github.com/anthropics/claude-code/issues/1103
https://github.com/anthropics/claude-code/issues/4470

View original on GitHub ↗

12 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1103
  2. https://github.com/anthropics/claude-code/issues/4470
  3. https://github.com/anthropics/claude-code/issues/4280

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

bogini collaborator · 11 months ago

@DevGeorge Thanks for the detailed bug report. This is a known issue that occurs when the auto-update process is interrupted partway through (typically due to network errors or system interruptions), leaving Claude Code in a partially updated state where critical files like yoga.wasm are missing.

The team is aware of this problem and working on making the update process more robust. In the meantime, I'd recommend trying our new native binary installation method, which tends to be more reliable and doesn't have this particular issue:
https://docs.anthropic.com/en/docs/claude-code/setup#native-binary-installation-beta

The native installer handles dependencies better and avoids the yoga.wasm issues entirely.

If you prefer to stick with npm for now, a clean reinstall should fix it:

npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code
DevGeorge · 11 months ago

I was about to submit another bug report with uninstalling it.

npm uninstall -g @anthropic-ai/claude-code

npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code
npm ERR! dest /Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/.claude-code-NsV7rvWM
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code' -> '/Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/.claude-code-NsV7rvWM'

npm ERR! A complete log of this run can be found in: /Users/devgeorge/.npm/_logs/2025-09-05T05_45_45_594Z-debug-0.log

Even using the force option doesnt work.

npm uninstall -g @anthropic-ai/claude-code --force

npm WARN using --force Recommended protections disabled.
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code
npm ERR! dest /Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/.claude-code-NsV7rvWM
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code' -> '/Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/.claude-code-NsV7rvWM'

npm ERR! A complete log of this run can be found in: /Users/devgeorge/.npm/_logs/2025-09-05T05_47_46_126Z-debug-0.log

This was how I had to force-uninstall

rm /Users/devgeorge/.nvm/versions/node/v20.10.0/bin/claude
rm -rf /Users/devgeorge/.nvm/versions/node/v20.10.0/lib/node_modules/@anthropic-ai/claude-code\n

After which a new install works... For a little bit anyways

ant-kurt collaborator · 11 months ago

You may want to try claude /migrate-installer or using our native installation https://docs.anthropic.com/en/docs/claude-code/setup#native-binary-installation-beta

pettermahlen · 11 months ago

FWIW, I'm seeing this happening on what I'm pretty sure is a native install (not sure how to tell which one I have). Uninstalling with the npm command does nothing. How do I reinstall a native installation?

EDIT: I tried simply rerunning the installation script (currently curl -fsSL https://claude.ai/install.sh | bash), and after reloading my shell, that worked. But it does look like the native installation is also susceptible to this problem.

jdt-incom · 11 months ago
FWIW, I'm seeing this happening on what I'm pretty sure is a native install (not sure how to tell which one I have). Uninstalling with the npm command does nothing. How do I reinstall a native installation? EDIT: I tried simply rerunning the installation script (currently curl -fsSL https://claude.ai/install.sh | bash), and after reloading my shell, that worked. But it does look like the native installation is also susceptible to this problem.

I too am using a native installation because I've had this issue once with the npm installation, and I've just encountered the problem again.

cktang88 · 11 months ago

also having this problem

O957 · 11 months ago

Re: <https://github.com/anthropics/claude-code/issues/7193#issuecomment-3279077286>

This worked for me.

1shanra1 · 11 months ago

Having this problem too.

rossvz · 11 months ago

Ran into this today - seems to be related to leaving the claude session open for a while. Ended up uninstalling and reinstalling and that seemed to resolve

aka-nez · 11 months ago

Same here

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.