craigburke / karma-gradle

Gradle Plugin for Running tests with Karma
Other
21 stars 11 forks source link

karmaRun if failing due to dependency error on windows #9

Open rpandit opened 8 years ago

rpandit commented 8 years ago

Selected primary task 'karmaRun' from project : Tasks to be executed: [task ':JavaScriptTesting:karmaInit', task ':JavaScriptTesting:nodeSetup', tas k ':JavaScriptTesting:karmaDependencies', task ':JavaScriptTesting:karmaGenerateConfig', task ':Java ScriptTesting:karmaRun'] :JavaScriptTesting:karmaInit (Thread[main,5,main]) started. :JavaScriptTesting:karmaInit Skipping task ':JavaScriptTesting:karmaInit' as it has no actions. :JavaScriptTesting:karmaInit UP-TO-DATE :JavaScriptTesting:karmaInit (Thread[main,5,main]) completed. Took 0.018 secs. :JavaScriptTesting:nodeSetup (Thread[main,5,main]) started. :JavaScriptTesting:nodeSetup Skipping task ':JavaScriptTesting:nodeSetup' as it is up-to-date (took 0.007 secs). :JavaScriptTesting:nodeSetup UP-TO-DATE :JavaScriptTesting:nodeSetup (Thread[main,5,main]) completed. Took 0.019 secs. :JavaScriptTesting:karmaDependencies (Thread[main,5,main]) started. :JavaScriptTesting:karmaDependencies Executing task ':JavaScriptTesting:karmaDependencies' (up-to-date check took 0.002 secs) due to: No history is available. Starting process 'command 'cmd''. Working directory: C:\workspace\current\wm_rma\JavaScriptTesting C ommand: cmd /c ""C:\Users\Administrator.gradle\nodejs\node-v4.2.3-windows-x64\bin\node.exe" "C:\Use rs\Administrator.gradle\nodejs\node-v4.2.3-linux-x86\lib\node_modules\npm\bin\npm-cli.js" "install" "--silent" "karma" "karma-chrome-launcher" "karma-jasmine" "jasmine-core"" Successfully started process 'command 'cmd'' :JavaScriptTesting:karmaDependencies FAILED :JavaScriptTesting:karmaDependencies (Thread[main,5,main]) completed. Took 1.185 secs.

FAILURE: Build failed with an exception.

:JavaScriptTesting:karmaDependencies FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 26.959 secs

C:\workspace\current>

ralfhergert commented 8 years ago

To get a better clue what's going wrong you may want to try: gradle karmaRun -PkarmaDebug=true The parameter karmaDebug controls whether or not node is called in silent mode.

In my case I could see that npm could not establish a network connection (due to missing proxy settings).

To fix the missing proxy configuration there are several options. Regarding to https://github.com/nodejs/node/blob/d538811fc8b920f3f36d5f21a4c23e270367ceb0/deps/npm/doc/misc/npm-config.md a config file .npmrc can be used or the enviroment variables HTTP_PROXY and HTTPS_PROXY can be set accordingly.