Brain.js: Error installing brain.js on windows

Created on 13 Dec 2020  路  8Comments  路  Source: BrainJS/brain.js

_What_ is wrong?

Upon installing, I get an error. This error seems to be coming from installing gl.

_Where_ does it happen?

In command prompt.

_How_ do we replicate the issue?

Simply run npm install -g brain.js

Expected behavior (i.e. solution)

Brain.js to install.

Version information

Npm: 6.14.8

Nodejs: 14.15.1

Browser:

Brain.js: latest build

_How_ important is this (1-5)?

4

Other Comments

The output from installing:

C:\Users\charl>npm install -g brain.js
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

> [email protected] install C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=14.15.1 runtime=node arch=ia32 libc= platform=win32)

C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\deps\windows\dll\ia32\libGLESv2.dll
C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\deps\windows\dll\ia32\libEGL.dll
C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\deps\windows\dll\ia32\d3dcompiler_47.dll
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  Copying C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl/deps/windows/dll/ia32/d3dcompiler_47.dll to C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\build\Release\d3dcompiler_47.dll
  The system cannot find the path specified.
  Copying C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl/deps/windows/dll/ia32/libEGL.dll to C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\build\Release\libEGL.dll
  The system cannot find the path specified.
  Copying C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl/deps/windows/dll/ia32/libGLESv2.dll to C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\build\Release\libGLESv2.dll
  The system cannot find the path specified.
  bindings.cc
  webgl.cc
  procs.cc
  win_delay_load_hook.cc
LINK : fatal error LNK1104: cannot open file 'libEGL.lib' [C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl\build\webgl.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\charl\AppData\Roaming\npm\node_modules\brain.js\node_modules\gl
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\charl\AppData\Roaming\npm-cache\_logs\2020-12-13T13_43_15_610Z-debug.log
bug

Most helpful comment

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.67. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 8 comments

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.67. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

I have managed to figure this out.

What was the issue?

It is an issue with gl. I thought I had it sorted out but it is now not working again. I have decided to ask the creators of gl instead so they know that if there is an issue,and so they are able to sort it out and publish a fix for it.

We have a similar issue here: https://github.com/BrainJS/brain.js/issues/655

I have asked the people over at gl and they have said that it is possibly an issue with not having the correct dlls for 32 bit. I am guessing that this is the case for me because I have x86 node js installed. I am now awaiting an answer.

I have fixed this by installing an x64 version of node js!

(yes!)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertleeplummerjr picture robertleeplummerjr  路  6Comments

sts-ryan-holton picture sts-ryan-holton  路  3Comments

iSumitBanik picture iSumitBanik  路  4Comments

sts-ryan-holton picture sts-ryan-holton  路  4Comments

lynxionxs picture lynxionxs  路  5Comments