apache / apache/pulsar-client-node
Cannot find module 'pulsar-client@1.12.0' by pnpm
- Langage dominant
- C++
- Étoiles
- 164
- Forks
- 98
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I tried to migrate an old project from `NPM` to `PNPM`, but after running `pnpm install`, when I try to start the project, I encounter a `MODULE_NOT_FOUND` error. How can I fix this issue?
```
node:internal/modules/cjs/loader:1247
throw err;
^
Error: Cannot find module '/Users/user/Desktop/project/frontend-websocket-api/node_modules/.pnpm/pulsar-client@1.12.0/node_modules/pulsar-client/lib/binding/pulsar.node'
Require stack:
- /Users/user/Desktop/project/frontend-websocket-api/node_modules/.pnpm/pulsar-client@1.12.0/node_modules/pulsar-client/src/pulsar-binding.js
- /Users/user/Desktop/project/frontend-websocket-api/node_modules/.pnpm/pulsar-client@1.12.0/node_modules/pulsar-client/index.js
- /Users/user/Desktop/project/frontend-websocket-api/dist/config/pulsar/pulsar.service.js
- /Users/user/Desktop/project/frontend-websocket-api/dist/gateway/pulsar-socket-frontend-service.js
- /Users/user/Desktop/project/frontend-websocket-api/dist/gateway/payment-pulsar-socket-impl/payment-pulsar-socket-impl.module.js
- /Users/user/Desktop/project/frontend-websocket-api/dist/gateway/gateway.module.js
- /Users/user/Desktop/project/frontend-websocket-api/dist/app.module.js
- /Users/user/Desktop/project/frontend-websocket-api/dist/main.js
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1335:12)
at require (node:internal/modules/helpers:136:16)
at Object. (/Users/user/Desktop/project/frontend-websocket-api/node_modules/.pnpm/pulsar-client@1.12.0/node_modules/pulsar-client/src/pulsar-binding.js:24:17)
at Module._compile (node:internal/modules/cjs/loader:1562:14)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/user/Desktop/project/frontend-websocket-api/node_modules/.pnpm/pulsar-client@1.12.0/node_modules/pulsar-client/src/pulsar-binding.js',
'/Users/user/Desktop/project/frontend-websocket-api/node_modules/.pnpm/pulsar-client@1.12.0/node_modules/pulsar-client/index.js',
'/Users/user/Desktop/project/frontend-websocket-api/dist/config/pulsar/pulsar.service.js',
'/Users/user/Desktop/project/frontend-websocket-api/dist/gateway/pulsar-socket-frontend-service.js',
'/Users/user/Desktop/project/frontend-websocket-api/dist/gateway/payment-pulsar-socket-impl/payment-pulsar-socket-impl.module.js',
'/Users/user/Desktop/project/frontend-websocket-api/dist/gateway/gateway.module.js',
'/Users/user/Desktop/project/frontend-websocket-api/dist/app.module.js',
'/Users/user/Desktop/project/frontend-websocket-api/dist/main.js'
]
}
```
Node.js v22.13.1
pnpm v10.4.1
- [x] Mac OS
- [x] ubuntu
[Cannot find module 'pulsar-client@1.12.0' by pnpm](https://stackoverflow.com/questions/79447727/cannot-find-module-pulsar-client1-12-0-by-pnpm)
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start by reproducing pnpm install and project startup with Node.js 22.13.1 and pnpm 10.4.1 on macOS or Ubuntu, then inspect pulsar-client/src/pulsar-binding.js and the missing lib/binding/pulsar.node path. Done means the native binding is available and the client starts without MODULE_NOT_FOUND.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, nodejs
- Domaine
- build-system
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- À clarifier
- Accessibilité débutants
- 38/100