Error installing karma

Tried to install Karma

npm install -g karma

A warning is issued.

npm WARN optional dep failed, continuing fsevents@0.3.5

In the end, it seems that Karma is not established

karma init karma.config.js
'karma' is not recognized as an internal or external command (so a windows installation).

However, it seems that in your pocket there is

C:\Users\Me\AppData\Roaming\npm\node_modules\karma

and file builerror.log

gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd  C:\Users\Me\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

Do i need to install python to work with karma or is there something else wrong? Thanks in advance for your help!

+4
source share
2 answers

You need to install the command line interface in order to karmabe recognized:

npm install -g karma-cli

Karma Installation Guide

The error node-gypis that python is not installed. To avoid this error, follow these steps:

Windows XP/Vista/7:  - Microsoft Visual Studio ++ 2013 (- )  - , x64 x64 x86
 ,  - , 64- ,   Windows SDK 7.1

Windows 7/8:  - Microsoft Visual Studio ++ 2013 Windows Desktop (-   )

Windows 10:  - Visual Studio Community 2015 Edition. ( ,  Visual ++ )  - GYP_MSVS_VERSION = 2015  -

, http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 .

Windows  - 64- node  Windows 7 64- SDK

, , , WindowsSDKDir , , SDK:

call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64

: node -gyp Github

+6

fooobar.com/questions/40440/....
node -gyp, node-gyp ( github). Windows, python , PYTHON.

+2

All Articles