Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffi-napi: Command failed #10

Open
engchina opened this issue May 7, 2023 · 5 comments
Open

ffi-napi: Command failed #10

engchina opened this issue May 7, 2023 · 5 comments

Comments

@engchina
Copy link

engchina commented May 7, 2023

Hi,

yarn failed on my ubuntu 22.04, the error shows as below. How to solve it?

# yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[2/2] ⡀ ffi-napi
error /root/workspace/gpt4free-ts/node_modules/ffi-napi: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /root/workspace/gpt4free-ts/node_modules/ffi-napi
Output:
events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:470:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:470:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn node-gyp',
  path: 'node-gyp',
  spawnargs: [ 'rebuild' ]
}
@xiangsx
Copy link
Owner

xiangsx commented May 8, 2023

Hi,

yarn failed on my ubuntu 22.04, the error shows as below. How to solve it?

# yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[2/2] ⡀ ffi-napi
error /root/workspace/gpt4free-ts/node_modules/ffi-napi: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /root/workspace/gpt4free-ts/node_modules/ffi-napi
Output:
events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:470:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:470:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn node-gyp',
  path: 'node-gyp',
  spawnargs: [ 'rebuild' ]
}

update node to v18.x

@ysh-git-ktc
Copy link

我node升级到了18.16.0,还是一样的错误,怎么办

@xiangsx
Copy link
Owner

xiangsx commented May 9, 2023

try docker or docker-compose
https://github.com/xiangsx/gpt4free-ts#run-with-docker

@IdaBruce
Copy link

我node升级到了18.16.0,还是一样的错误

@ModestyRose
Copy link

why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants