Skip to content

Cannot find module '@oxc-parser #33480

@hlassiege

Description

@hlassiege

Environment

  • Operating System: Windows_NT
  • Node Version: v20.18.0
  • Nuxt Version: ^4.1.3
  • CLI Version: 3.29.3
  • Nitro Version: 2.12.7
  • Package Manager: unknown
  • Builder: -
  • User Config: compatibilityDate, devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

How to reproduce :

npm create nuxt@latest oxc --compatibilityVersion=4
Need to install the following packages:
create-nuxt@3.29.3
...
√ Which package manager would you like to use?
npm
and that's all.

I can reproduce it on windows and debian.

The code is also here:

https://github.com/hlassiege/oxc

but nothing fancy, it's only the result of npm create nuxt@latest oxc

Describe the bug

I can't build an application. I have the same error each time saying that oxc-parser don't have a native binding available.

On debian (distant env, deployed on coolify) :

#11 9.194 [error] Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
2025-Oct-14 17:17:58.031442
#11 9.194   at node_modules/oxc-parser/src-js/bindings.js:553:11
2025-Oct-14 17:17:58.031442
#11 9.194   at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
2025-Oct-14 17:17:58.031442
#11 9.194   at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
2025-Oct-14 17:17:58.031442
#11 9.194   at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:946:35)
2025-Oct-14 17:17:58.031442
#11 9.194   at async Object.run (node_modules/@nuxt/cli/dist/chunks/prepare.mjs:32:18)
2025-Oct-14 17:17:58.031442
#11 9.194   at async runCommand (node_modules/citty/dist/index.mjs:316:16)
2025-Oct-14 17:17:58.031442
#11 9.194   at async runCommand (node_modules/citty/dist/index.mjs:307:11)
2025-Oct-14 17:17:58.031442
#11 9.194   at async runMain (node_modules/citty/dist/index.mjs:445:7)
2025-Oct-14 17:17:58.031442
#11 9.194
2025-Oct-14 17:17:58.031442
#11 9.194   [cause]: Cannot find module '@oxc-parser/binding-linux-x64-gnu'

Or on Windows (local dev)

 ERROR  Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try npm i again after removing both package-lock.json and node_modules directory.              19:05:05

    at /C:/Dev/src/blog/app/node_modules/oxc-parser/src-js/bindings.js:553:11
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async loadNuxt (/C:/Dev/src/blog/app/node_modules/@nuxt/kit/dist/index.mjs:946:35)
    at async Object.run (/C:/Dev/src/blog/app/node_modules/@nuxt/cli/dist/chunks/prepare.mjs:32:18)
    at async runCommand (/C:/Dev/src/blog/app/node_modules/citty/dist/index.mjs:316:16)
    at async runCommand (/C:/Dev/src/blog/app/node_modules/citty/dist/index.mjs:307:11)
    at async runMain (/C:/Dev/src/blog/app/node_modules/citty/dist/index.mjs:445:7)

  [cause]: Cannot find module '@oxc-parser/binding-win32-x64-msvc'

Additional context

Issue also opened on oxc : oxc-project/oxc#14598

Logs

C:\Dev\src\blog\app>npm ci
npm warn deprecated @types/parse-path@7.1.0: This is a stub types definition. parse-path provides its own type definitions, so you do not need this installed.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

> postinstall
> nuxt prepare


 ERROR  Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try npm i again after removing both package-lock.json and node_modules directory.              19:05:05

    at /C:/Dev/src/blog/app/node_modules/oxc-parser/src-js/bindings.js:553:11
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async loadNuxt (/C:/Dev/src/blog/app/node_modules/@nuxt/kit/dist/index.mjs:946:35)
    at async Object.run (/C:/Dev/src/blog/app/node_modules/@nuxt/cli/dist/chunks/prepare.mjs:32:18)
    at async runCommand (/C:/Dev/src/blog/app/node_modules/citty/dist/index.mjs:316:16)
    at async runCommand (/C:/Dev/src/blog/app/node_modules/citty/dist/index.mjs:307:11)
    at async runMain (/C:/Dev/src/blog/app/node_modules/citty/dist/index.mjs:445:7)

  [cause]: Cannot find module '@oxc-parser/binding-win32-x64-msvc'
Require stack:
- C:\Dev\src\blog\app\node_modules\oxc-parser\src-js\bindings.js

      at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
      at Module._load (node:internal/modules/cjs/loader:1051:27)
      at Module.require (node:internal/modules/cjs/loader:1311:19)
      at require (node:internal/modules/helpers:179:18)
      at requireNative (/C:/Dev/src/blog/app/node_modules/oxc-parser/src-js/bindings.js:118:25)
      at /C:/Dev/src/blog/app/node_modules/oxc-parser/src-js/bindings.js:512:17
      at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
      at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
      at async loadNuxt (/C:/Dev/src/blog/app/node_modules/@nuxt/kit/dist/index.mjs:946:35)
      at async Object.run (/C:/Dev/src/blog/app/node_modules/@nuxt/cli/dist/chunks/prepare.mjs:32:18)

    [cause]: Cannot find module './parser.win32-x64-msvc.node'
Require stack:
- C:\Dev\src\blog\app\node_modules\oxc-parser\src-js\bindings.js

        at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
        at Module._load (node:internal/modules/cjs/loader:1051:27)
        at Module.require (node:internal/modules/cjs/loader:1311:19)
        at require (node:internal/modules/helpers:179:18)
        at requireNative (/C:/Dev/src/blog/app/node_modules/oxc-parser/src-js/bindings.js:113:16)
        at /C:/Dev/src/blog/app/node_modules/oxc-parser/src-js/bindings.js:512:17
        at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
        at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
        at async loadNuxt (/C:/Dev/src/blog/app/node_modules/@nuxt/kit/dist/index.mjs:946:35)
        at async Object.run (/C:/Dev/src/blog/app/node_modules/@nuxt/cli/dist/chunks/prepare.mjs:32:18)



 ERROR  Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try npm i again after removing both package-lock.json and node_modules directory.              19:05:05

npm error code 1
npm error path C:\Dev\src\blog\app

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions