Canvas/ChartJs dependency on Cairo - reactjs

Why is there a dependency of installing Cairo for using Canvas/ChartJS? I am using OSX / Mac. I am running into issues which installing this project for Charts. I have seen some stackoverflow threads where the resolution is to install the system level libraries of Cairo.
https://github.com/jerairrest/react-chartjs-2
> canvas#1.6.7 install /Users/rjain/code/react-chartjs-2/node_modules/canvas
> node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/rjain/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 17.0.0
gyp ERR! command "/Users/rjain/.config/fnm/bin/node" "/Users/rjain/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rjain/code/react-chartjs-2/node_modules/canvas
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN react-chartjs-2#2.6.4 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#1.6.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.6.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! /Users/rjain/.npm/_logs/2017-10-11T21_53_41_819Z-debug.log

Related

i try to install Gatsby in windows but it showing some error?

npm ERR! code 1
npm ERR! path C:\Users\ShanmugaPriya\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\lmdb
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build-optional-packages
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | win32 | ia32
npm ERR! gyp info find Python using Python version 3.9.5 found at "C:\Users\ShanmugaPriya\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! 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"
npm ERR! gyp ERR! cwd C:\Users\ShanmugaPriya\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\lmdb
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ShanmugaPriya\AppData\Local\npm-cache\_logs\2022-07-19T05_40_40_107Z-debug-0.log
This maybe help for you
You can try with latest version of your visual studio code or nodejs.
nodejs version v16.16.0
Install the latest version of Visual Studio and Desktop development with C++

Can't install redux & react-redux

I am using these commands to install redux:
npm install redux
npm install --save redux
npm install --save redux --force
The same commands to install react-redux with replacing redux in the above commands.
npm install react-redux
npm install --save react-redux
npm install --save react-redux --force
But the issue is, it installs normally in Windows C Directory and when I import and use it:
import {bindActionCreators,createStore, applyMiddleware} from 'redux'
import {connect, Provider } from 'react-redux'
It Displays the Following Error:
Uncaught Error: Cannot find module 'react-redux'
Then, I stop the Server and install it in Project Directory it displays the Following Error.
npm WARN using --force Recommended protections disabled.
npm ERR! code 1
npm ERR! path E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\Kashif Iftikhar\University\FYP\Code\React Native\Plantonics\node_modules\grpc\src\node\extension_binary\node-v88-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc\src\node\extension_binary\node-v88-win32-x64-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.14.0
npm ERR! node-pre-gyp info using node#15.11.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc\src\node\extension_binary\node-v88-win32-x64-unknown\grpc_node.node" (not found)
npm ERR! node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v88-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v88-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v88-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for grpc#1.24.2 and node#15.11.0 (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v88-win32-x64-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#15.11.0 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#15.11.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.8.5 found at "C:\Users\Qasim Iftikhar\anaconda3\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:333:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! System Windows_NT 10.0.10240
npm ERR! 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" "--fallback-to-build" "--library=static_library" "--module=E:\\Kashif Iftikhar\\Coding\\Projects\\Latest Projects\\React Native\\Plantonics\\node_modules\\grpc\\src\\node\\extension_binary\\node-v88-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\\Kashif Iftikhar\\Coding\\Projects\\Latest Projects\\React Native\\Plantonics\\node_modules\\grpc\\src\\node\\extension_binary\\node-v88-win32-x64-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v88"
npm ERR! gyp ERR! cwd E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc
npm ERR! gyp ERR! node -v v15.11.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc\src\node\extension_binary\node-v88-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc\src\node\extension_binary\node-v88-win32-x64-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:378:20)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.10240
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Kashif Iftikhar\\Coding\\Projects\\Latest Projects\\React Native\\Plantonics\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
npm ERR! node-pre-gyp ERR! cwd E:\Kashif Iftikhar\Coding\Projects\Latest Projects\React Native\Plantonics\node_modules\grpc
npm ERR! node-pre-gyp ERR! node -v v15.11.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Qasim Iftikhar\AppData\Local\npm-cache\_logs\2021-03-26T06_53_12_689Z-debug.log
Also there is no "lodash-es": "~4.0.0" in my Package.json file.
Note: I am Building App with Expo CLI and just imported Redux to fetch data from Google Firebase.
Remove node_modules and reinstall, or try use yarn
rm -rf node_modules/ && npm install

NPM throws error while installing quick.db

I am trying to install quick.db to get started with databases and SQLite3 specifically, but when I try installing it, it always throws an error. The NPM version I have is 6.14.11 and Node version is v14.16.0.
> better-sqlite3#7.1.2 install E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3
> prebuild-install || npm run build-release
prebuild-install WARN install No prebuilt binaries found (target=14.16.0 runtime=node arch=x64 libc= platform=win32)
> better-sqlite3#7.1.2 build-release E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3
> node-gyp rebuild --release
E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19041
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" "--release"
gyp ERR! cwd E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 build-release 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\gigabyte\AppData\Roaming\npm-cache\_logs\2021-03-14T09_23_59_004Z-debug.log
npm WARN databases#1.0.0 No description
npm WARN databases#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 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\gigabyte\AppData\Roaming\npm-cache\_logs\2021-03-14T09_23_59_397Z-debug.log
After juggling through the internet, I finally found the correct answer that works.
Here is the link to that:https://stackoverflow.com/questions/55152761/npm-wont-install-quick-db-returns-these-errors#:~:text=All%20you%20have%20to%20do,I%20found%20this%20solution%20here!
The first answer is perfect!

I was trying to run sb-admin-bs4-angular2-master which is an nodejs app and getting the following error when i run npm install

enter image description here
first i run npm install -g ts-node
then i run npm install which gives me following error...no idea what to do..
when i run it by npm start ... it gives me more errors of gulp server or something
C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "C:\Users\Raheel\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, 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 failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
gyp ERR! System Windows_NT 6.1.7601
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\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.15 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\npm-debug.log
C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-m
aster>
In the first lines you can read :
Error: Python executable "C:\Users\Raheel\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp.
Check that you have python 2.5 installed, seems like npm can't use python 3.x
If I'm not wrong, you need a python version which is 2.5 or higher but lower than 3.0.
Check npm doc for more.

Error installing angular using npm

How to install angular using npm on Windows 8.1 64bit?
I have installed:
node v.0.10.32
npm v.1.4.28
Python v2.7.8
Microsoft Visual Studio Express 2012 for Windows 8
Microsoft Visual C++ 2012
If I run npm install angular in Developer Command Prompt for VS2012 I get this error:
c:\.....\.node-gyp\0.10.32\deps\uv\include\uv-private/uv-win.h(
32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or
directory [c:\.......\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\.....\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "D:\\robocat\\tools\\nodejs\\node_modules\\npm\\node_mod
ules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\....\node_modules\an
gular\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! contextify#0.1.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.9 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\.....\\nodejs\\\\node.exe" "D:\\robocat\\tools\\n
odejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "angular"
npm ERR! cwd c:\
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
But, if I run in CMD, i get this error:
c:\Users\....\node_modules\angular\node_m
odules\jsdom\node_modules\contextify\build\contextify.vcxproj(18,3): error MSB4
019: The imported project "c:\Microsoft.Cpp.Default.props" was not found. Confi
rm that the path in the <Import> declaration is correct, and that the file exis
ts on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\robocat\tools\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "D:\......\\nodejs\\node_modules\\npm\\node_mod
ules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\......\node_modules\an
gular\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! contextify#0.1.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.9 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\......\\nodejs\\\\node.exe" "D:\\robocat\\tools\\n
odejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "angular" "--save"
npm ERR! cwd c:\angular-playground
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Resources