error while starting #1

Closed
opened 2026-04-11 00:42:58 +03:00 by adminxd · 1 comment
Owner
~/code/bonch-md-client  ‹feat/initial-scaffold*› $ npm run dev

> bonch-md-client@0.0.0 dev
> vite

You are using Node.js 21.7.3. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.
file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:507
                if (loadErrors.length > 0) throw new 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.", { cause: loadErrors.reduce((err, cur) => {
                                                 ^

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.
    at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:507:36
    at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48
    ... 2 lines matching cause stack trace ...
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async CAC.<anonymous> (file:///Users/snus/code/bonch-md-client/node_modules/vite/dist/node/cli.js:707:27) {
  [cause]: Error: Cannot find module '@rolldown/binding-darwin-arm64'
  Require stack:
  - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs
      at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
      ... 2 lines matching cause stack trace ...
      at require (node:internal/modules/helpers:179:18)
      at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:219:22)
      at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18
      at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48
      at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46
      at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
      at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs'
    ],
    cause: Error: Cannot find module './rolldown-binding.darwin-arm64.node'
    Require stack:
    - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs
        at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
        ... 2 lines matching cause stack trace ...
        at require (node:internal/modules/helpers:179:18)
        at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:214:13)
        at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18
        at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48
        at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46
        at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
        at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs'
      ],
      cause: Error: Cannot find module '@rolldown/binding-darwin-universal'
      Require stack:
      - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs
          at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
          ... 2 lines matching cause stack trace ...
          at require (node:internal/modules/helpers:179:18)
          at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:191:21)
          at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18
          at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48
          at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46
          at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
          at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
        code: 'MODULE_NOT_FOUND',
        requireStack: [
          '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs'
        ],
        cause: Error: Cannot find module './rolldown-binding.darwin-universal.node'
        Require stack:
        - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs
            at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
            at Module._load (node:internal/modules/cjs/loader:983:27)
            at Module.require (node:internal/modules/cjs/loader:1230:19)
            at require (node:internal/modules/helpers:179:18)
            at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:186:12)
            at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18
            at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48
            at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46
            at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
            at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
          code: 'MODULE_NOT_FOUND',
          requireStack: [
            '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs'
          ]
        }
      }
    }
  }
}

Node.js v21.7.3
``` ~/code/bonch-md-client ‹feat/initial-scaffold*› $ npm run dev > bonch-md-client@0.0.0 dev > vite You are using Node.js 21.7.3. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version. file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:507 if (loadErrors.length > 0) throw new 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.", { cause: loadErrors.reduce((err, cur) => { ^ 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. at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:507:36 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48 ... 2 lines matching cause stack trace ... at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) at async CAC.<anonymous> (file:///Users/snus/code/bonch-md-client/node_modules/vite/dist/node/cli.js:707:27) { [cause]: Error: Cannot find module '@rolldown/binding-darwin-arm64' Require stack: - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15) ... 2 lines matching cause stack trace ... at require (node:internal/modules/helpers:179:18) at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:219:22) at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs' ], cause: Error: Cannot find module './rolldown-binding.darwin-arm64.node' Require stack: - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15) ... 2 lines matching cause stack trace ... at require (node:internal/modules/helpers:179:18) at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:214:13) at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs' ], cause: Error: Cannot find module '@rolldown/binding-darwin-universal' Require stack: - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15) ... 2 lines matching cause stack trace ... at require (node:internal/modules/helpers:179:18) at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:191:21) at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs' ], cause: Error: Cannot find module './rolldown-binding.darwin-universal.node' Require stack: - /Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15) at Module._load (node:internal/modules/cjs/loader:983:27) at Module.require (node:internal/modules/cjs/loader:1230:19) at require (node:internal/modules/helpers:179:18) at requireNative (file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:186:12) at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:475:18 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs:9:48 at file:///Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs:3:46 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/snus/code/bonch-md-client/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs' ] } } } } } Node.js v21.7.3 ```

I have downgraded Vite to version 5, which supports Node.js 21.7.3. I also fixed some TypeScript issues related to type-only imports. The project should now start and build correctly.

Fixes #1

I have downgraded Vite to version 5, which supports Node.js 21.7.3. I also fixed some TypeScript issues related to type-only imports. The project should now start and build correctly. Fixes #1
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adminxd/bonch-md-client#1