Unable to install @tensorflow/tfjs-node
See original GitHub issueI am unable to install @tensorflow/tfjs-node. I’d appreciate it if someone can shed some light and let me know what I’m missing. I’m running the following:
- Windows 10 Pro version 1803
- node v10.13.0
- npm 6.4.1
- Python 2.7.15
C:\Users\jcruz\Documents\nodejs\demo>node -v
v10.13.0
C:\Users\jcruz\Documents\nodejs\demo>npm --v
6.4.1
C:\Users\jcruz\Documents\nodejs\demo>python
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Users\jcruz\Documents\nodejs\demo>npm install @tensorflow/tfjs-node
> @tensorflow/tfjs-node@0.1.20 install C:\Users\jcruz\Documents\nodejs\node_modules\@tensorflow\tfjs-node
> node scripts/install.js
* Downloading libtensorflow
[==============================] 13622503/bps 98% 0.0s
* Building TensorFlow Node.js bindings
C:\Users\jcruz\Documents\nodejs\node_modules\@tensorflow\tfjs-node\scripts\install.js:154
throw new Error('node-gyp rebuild failed with: ' + err);
^
Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe\` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\jcruz\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jcruz\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jcruz\Documents\nodejs\node_modules\@tensorflow\tfjs-node
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
at cp.exec (C:\Users\jcruz\Documents\nodejs\node_modules\@tensorflow\tfjs-node\scripts\install.js:154:13)
at ChildProcess.exithandler (child_process.js:296:5)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\jcruz\Documents\nodejs\package.json'
npm WARN nodejs No description
npm WARN nodejs No repository field.
npm WARN nodejs No README data
npm WARN nodejs No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@0.1.20 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@0.1.20 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\jcruz\AppData\Roaming\npm-cache\_logs\2018-11-15T01_16_06_967Z-debug.log
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Unable to install @tensorflow/tfjs-node with npm
I tried installing 'node-pre-gyp' globally, with and without root permissions but no success.
Read more >Installation of tensorflow/tfjs-node fails · Issue #6700 - GitHub
Installation of tensorflow/tfjs-node fails #6700 comp:node. js type:build/install Windows.
Read more >@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the ...
Read more >Unable to install @tensorflow/tfjs-node - General
Hi, I am a beginner to node-red. I have been trying to install the @tensorflow/tfjs-node to node-red. In Winodws cmd and node-red on...
Read more >Installation error for tfjs-node on raspberry pi 3
Hello,. I'm unable to install tensorflowjs for node on raspberry pi. ... npm rebuild @tensorflow/tfjs-node .... gyp verb node dev dir /home/pi/.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hi @nightBaker
can you run
npm install --production windows-build-tools
and then try to install tfjs-node? I used to have a similar MSBUILD error and reinstall windows-build-tools resolved it.l@nkreeger, I took a look at https://github.com/nodejs/node-gyp/issues/119#issuecomment-331778053 and I think that solved my problem.
Though when I first tried to install the windows-build-tools package, I got an error because I didn’t run from an elevated Command Prompt. But when I opened a Command Prompt that had administrative privileges, the install went smoothly, albeit slowly (took about 5 minutes).
First I installed windows-build-tools:
C:\Users\jcruz\Documents\nodejs\demo>npm install --production windows-build-tools
Then I installed @tensorflow/tfjs-node:
C:\Users\jcruz\Documents\nodejs\demo>npm install @tensorflow/tfjs-node
Aside from some warnings, looks like I was finally able to install @tensorflow/tfjs-node!
Thanks much @nkreeger for the help!