Brain.js: npm install brain.js on Windows failure

Created on 3 Nov 2020  路  3Comments  路  Source: BrainJS/brain.js

Meme

The Kamal stack is my favorite
image

_What_ is wrong?

npm install brain.js outputs:

$ npm install 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\tmendez\Code\UpsellTraining\node_modules\gl
> prebuild-install || node-gyp rebuild

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

C:\Users\tmendez\Code\UpsellTraining\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\tmendez\Code\UpsellTraining\node_modules\gl\deps\windows\dll\ia32\d3dcompiler_47.dll
C:\Users\tmendez\Code\UpsellTraining\node_modules\gl\deps\windows\dll\ia32\libEGL.dll
C:\Users\tmendez\Code\UpsellTraining\node_modules\gl\deps\windows\dll\ia32\libGLESv2.dll
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\tmendez\Code\UpsellTraining\node_modules\gl\build\webgl.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Windows_NT 10.0.17763
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\tmendez\Code\UpsellTraining\node_modules\gl
gyp ERR! node -v v11.5.0
gyp ERR! node-gyp -v v3.8.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\tmendez\AppData\Roaming\npm-cache\_logs\2020-11-03T00_43_18_982Z-debug.log

_Where_ does it happen?

In the git bash environment, when running npm install brain.js at the root of my project.

_How_ do we replicate the issue?

  • Be on Windows
  • Install Python 2.7
  • Install Microsoft Visual Studio Build Tools 2015
  • run in cmd: npm config set msvs_version 2015
  • run in cmd: npm config set python python2.7
  • Run npm install brain.js

Expected behavior (i.e. solution)

Brain.js should install successfully

Version information

Nodejs: v11.5.0

Brain.js: @latest

_How_ important is this (1-5)?

4, can't run on Windows (but have had no problems on OSX)

Other Comments

I've tried python 3.9 and microsoft build tools 2017 as well, to no avail.

bug

Most helpful comment

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

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

All 3 comments

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

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

It does install properly in my Visual Studio Code on Windows 10 with Python 2.7. What version of Windows is it, 64 or 32 bit? It looks like a problem with node-gyp in Visual Studio Build Tools 2015 rather than brain.js library itself or [email protected] module.

Windows 10 Enterprise 64 bit. I tried reinstalling visual studio build tools 2015, 2017, and 2019 to no avail unfortunately.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ximik753 picture ximik753  路  3Comments

shopsoy picture shopsoy  路  3Comments

lucaspojo picture lucaspojo  路  5Comments

akii0008 picture akii0008  路  5Comments

robertleeplummerjr picture robertleeplummerjr  路  6Comments