I could not install library of tensorflow.js module in my project, in local machine. It's portraying the problem as follows:
Building TensorFlow Node.js bindings
C:\mlwithjs\tensorflowjs\node_modules\#tensorflow\tfjs-node\scripts\install.js:176
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:\Program Files\nodejs\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.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\mlwithjs\tensorflowjs\node_modules\#tensorflow\tfjs-node
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
at cp.exec (C:\mlwithjs\tensorflowjs\node_modules\#tensorflow\tfjs-node\scripts\install.js:176:13)
at ChildProcess.exithandler (child_process.js:301: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 rollback Rolling back #types/seedrandom#2.4.27 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\mlwithjs\tensorflowjs\node_modules\#types'
npm WARN rollback Rolling back #types/webgl2#0.0.4 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\mlwithjs\tensorflowjs\node_modules\#types'npm WARN tensorflowjs#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #tensorflow/tfjs-node#0.2.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #tensorflow/tfjs-node#0.2.1 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\Saqib\AppData\Roaming\npm-cache\_logs\2019-01-03T15_18_04_741Z-debug.log
I have tried a command npm install -g build tools. Although it's installing other modules.
I am using npm install #tensorflow/tfjs-node command to install it, but it didn't help. I googled for it, but haven't found anything.
Related
I am receiving an error while installing node-bluetooth module. I have already installed node-gyp but still receiving the error:
BluetoothSerialPortServer.vcxproj -> C:\Users\Marios H\WebstormProjects\demo3\server\node_modules\node-bluetooth\build\Release\\BluetoothSerialPortServer.node
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\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:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\Marios H\WebstormProjects\demo3\server\node_modules\node-bluetooth
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN server#1.0.0 No description
npm WARN server#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-bluetooth#1.2.6 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-bluetooth#1.2.6 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\Marios H\AppData\Roaming\npm-cache\_logs\2020-07-21T10_04_19_956Z-debug.log
Also i have installed Visual Studio Build Tools 2017
I have recently done a clean reformatting of my Windows PC, installed Atom, and Node.js and started by installing the package dualshock. I give it a minute and it fails with this error code:
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Starb\node_modules\node-hid
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN starb#1.0.0 No description
npm WARN starb#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid#0.5.7 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid#0.5.7 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\Starb\AppData\Roaming\npm-cache\_logs\2019-11-29T13_46_21_869Z-debug.log
I tried reinstalling gyp, Node, cleaning the cache, anything you can possibly imagine. i googled everywhere and couldnt find any solution that worked.
Full log from the console
If you use windows you are probably missing windows-build-tools
npm install --global --production windows-build-tools
Reference: https://github.com/nodejs/node-gyp
I'm trying to install (npm i recommender) module but i came across several erros, regarding pyhon version an so on, the one i haven't got a solution for is Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
I tried removing and installing node-gyp module and applying also several solutions found on the internet(i have vs community 2017 with c++ installed), and used npm install --msvs_version=2017.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\IANNIS\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:190:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Users\\IANNIS\\Desktop\\project_app\\server\\node_modules\\node\\bin\\node.exe" "C:\\Users\\IANNIS\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\IANNIS\Desktop\project_app\server\node_modules\recommender
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v5.0.2
gyp ERR! not ok
npm WARN api_food_finder#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! recommender#3.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the recommender#3.0.0 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\IANNIS\AppData\Roaming\npm-cache\_logs\2019-07-15T21_15_43_134Z-debug.log
C:\Users\IANNIS\Desktop\project_app\server>
I get an issue when installing node-sass on my server (Ubuntu 16.04). On my local server I haven't theses errors...
NodeJS version : v10.2.1
Npm version : 5.6.0
Node sass version : ^4.9.0
Error message :
****#web-test:/var/www/****$ sudo npm i node-sass
> node-sass#4.9.0 install /var/www/****/node_modules/node-sass
> node scripts/install.js
Unable to save binary /var/www/****/node_modules/node-sass/vendor/linux-x64-64 : { Error: EACCES: permission denied, mkdir '/var/www/****/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:872:3)
at sync (/var/www/****/node_modules/mkdirp/index.js:71:13)
at Function.sync (/var/www/****/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/var/www/****/node_modules/node-sass/scripts/install.js:114:11)
at Object.<anonymous> (/var/www/****/node_modules/node-sass/scripts/install.js:157:1)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
errno: -13,
syscall: 'mkdir',
code: 'EACCES',
path: '/var/www/****/node_modules/node-sass/vendor' }
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/www/****/node_modules/node-sass/build'
gyp ERR! System Linux 4.4.0-116-generic
gyp ERR! command "/usr/local/bin/node" "/var/www/****/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/****/node_modules/node-sass
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN ****#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.0 postinstall 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! /home/****/.npm/_logs/2018-06-04T14_54_18_635Z-debug.log
Permissions on the folder : drwxr-xr-x 11 root root 4096 june 4 17:25 ****
Error after updating rights :
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stackbcrypt_lib.target.mk:97: recipe for target 'Release/obj.target/bcrypt_lib/src/bcrypt_node.o' failed
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory '/var/www/****/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.4.0-116-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/****/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/var/www/****/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /var/www/****/node_modules/bcrypt
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.4.0-116-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/****/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/var/www/****/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /var/www/****/node_modules/bcrypt
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/****/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/var/www/****/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/var/www/****/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Linux 4.4.0-116-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/var/www/****/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /var/www/****/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.2.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/****/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/var/www/****/node_modules/bcrypt/lib/binding' (1)
npm WARN ****#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#1.0.3 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#1.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Right solution (after many searches) :
sudo rm -rf ~/.node-gyp
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo npm i --unsafe-perm
It seems that the root user is the only one who has access to the /www/var folder. It would be better to create a dedicated user for that.
First of all, check with which user you're currently logged in with the following command:
$ whoami
And update the permissions of your destination folder for that user:
sudo chown -R $USER /var/www/[YOUR FOLDER]
And finally run npm install again.
This is the error I get when running npm install --save mocha ganache-cli web3#1.0.0-beta.26 :
rohitgoud$ npm install --save mocha ganache-cli web3#1.0.0-beta.26
> scrypt#6.0.3 preinstall /Users/rohitgoud/node_modules/scrypt
> node node-scrypt-preinstall.js
Error: Error: Command failed: ./configure
configure: error: in `/Users/rohitgoud/node_modules/scrypt/scrypt/scrypt-1.2.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
> scrypt#6.0.3 install /Users/rohitgoud/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/anaconda3/bin/python" is v3.6.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:567:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rohitgoud/node_modules/scrypt
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/rohitgoud/package.json'
npm WARN webpack-cli#2.0.15 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN rohitgoud No description
npm WARN rohitgoud No repository field.
npm WARN rohitgoud No README data
npm WARN rohitgoud No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 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! /Users/rohitgoud/.npm/_logs/2018-04-26T01_45_43_548Z-debug.log
you need install python2.7(recommend)