eilvelia / tdl

Node.js bindings to TDLib 🥒
MIT License
403 stars 53 forks source link

Cannot find module!!!!!!! #98

Closed sajjadmrx closed 2 years ago

sajjadmrx commented 3 years ago

(node:4944) UnhandledPromiseRejectionWarning: Error: Cannot find module '../build/Release/td.node'

eilvelia commented 3 years ago

Don't yell... Were there any errors when you executed npm install?

BAE86AEC1946B6AB60CCD7452DC811F0 commented 3 years ago

me too. no errors npm install

BAE86AEC1946B6AB60CCD7452DC811F0 commented 3 years ago
npm install
npm WARN tg@1.0.0 No description
npm WARN tg@1.0.0 No repository field.

audited 50 packages in 0.741s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Error: Cannot find module '../build/Release/td.node'
Require stack:
- ***\node_modules\tdl-tdlib-addon\dist\index.js
- ***\node_modules\tdl-tdlib-addon\index.js
- ***\index.js
eilvelia commented 3 years ago

Looks like new npm v7 doesn't output node-gyp's log (i.e. log of the postinstall script) if the process exited with zero exit code. I fixed the issue in tdl-tdlib-addon v1.0.1, install it again. You'll get the error log. Most likely Python or a C++ compiler is not installed on your device.