BrainJS / BrainJS/brain.js

Unable to install Brain.js on PopOS

Open
#904 24 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
14.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

![A GIF or MEME to give some spice of the internet](url)

## _What_ is wrong?

When I run ```npm i brain.js``` in the folder of my project, I get the following error:
```html
npm ERR! code 1
npm ERR! path /home/user/Documents/chessy/node_modules/gl
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.5.0 runtime=node arch=x64 libc= platform=linux)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@20.5.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.4 found at "/home/linuxbrew/.linuxbrew/opt/python@3.11/bin/python3.11"
npm ERR! gyp info spawn /home/linuxbrew/.linuxbrew/opt/python@3.11/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/user/Documents/chessy/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/user/Documents/chessy/node_modules/gl/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/user/Documents/chessy/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/user/.cache/node-gyp/20.5.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/user/.cache/node-gyp/20.5.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/user/Documents/chessy/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/user/.cache/node-gyp/20.5.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/user/Documents/chessy/node_modules/gl',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! /bin/sh: 1: python: not found
npm ERR! gyp: Call to 'python commit_id.py check ..' returned exit status 127 while in angle/src/angle.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/home/user/Documents/chessy/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 6.2.6-76060206-generic
npm ERR! gyp ERR! command "/home/linuxbrew/.linuxbrew/Cellar/node/20.5.0/bin/node" "/home/user/Documents/chessy/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/user/Documents/chessy/node_modules/gl
npm ERR! gyp ERR! node -v v20.5.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
```

Whenever I try to sort of omit this error and do ```yarn add brain.js```, I run the app and get the message ```Error: Cannot find module 'gpu.js'```.

I use Brain.js in Next.js.

## Version information

### Nodejs:
v20.5.0

### Browser:
Google Chrome

### Brain.js:
***Unable to install***, but mean to install the latest version possible.

## _How_ important is this (1-5)?
It, I think, is 5, because I cannot install the library from the very get-go.

## Other Comments
I never have this error on Windows.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.