xiangsx / gpt4free-ts

Providing a free OpenAI GPT-4 API ! This is a replication project for the typescript version of xtekky/gpt4free
GNU General Public License v3.0
7.71k stars 1.36k forks source link

Not compatible with Node.js v18.18.0 or later #97

Open pasqualesimonetti opened 1 year ago

pasqualesimonetti commented 1 year ago
% yarn
yarn install v1.22.19
warning ../../package.json: No license field
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ”¨  Building fresh packages...
[-/3] β ‚ waiting...
[3/3] β ‚ ffi-napi
error /Users/username/Developer/gpt4free-ts/node_modules/ffi-napi: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments: 
Directory: /Users/username/Developer/gpt4free-ts/node_modules/ffi-napi
Output:
node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:290:12)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn node-gyp',
  path: 'node-gyp',
  spawnargs: [ 'rebuild' ]
}

Node.js v18.18.0

Use Node.js 16 instead.