heydryft / tlsclient.js

An axios based wrapper for bogdanfinn/tls-client based on ffi-rs for unparalleled performance and usability.
30 stars 10 forks source link

ReferenceError: readFileSync is not defined #6

Open fancy45daddy opened 9 months ago

fancy45daddy commented 9 months ago

I can not install the library

npm notice 
npm notice New minor version of npm available! 10.2.3 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g npm@10.4.0 to update!
npm notice 
npm ERR! code 1
npm ERR! path /home/chaowenguo/node_modules/@dryft/tlsclient
npm ERR! command failed
npm ERR! command sh -c node ./scripts/postinstall.js
npm ERR! /home/chaowenguo/node_modules/@dryft/tlsclient/scripts/tlspath.js:21
npm ERR!   let releaseDetails = readFileSync("/etc/os-release", "utf8");
npm ERR!                        ^
npm ERR! 
npm ERR! ReferenceError: readFileSync is not defined
npm ERR!     at Object.<anonymous> (/home/chaowenguo/node_modules/@dryft/tlsclient/scripts/tlspath.js:21:24)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1376:14)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1207:32)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:1023:12)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1235:19)
npm ERR!     at require (node:internal/modules/helpers:176:18)
npm ERR!     at Object.<anonymous> (/home/chaowenguo/node_modules/@dryft/tlsclient/scripts/postinstall.js:3:34)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1376:14)
npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
npm ERR! 
npm ERR! Node.js v21.2.0