I am getting error throw er; // Unhandled 'error' event when try to install NYC code coverage tool using terminal - code-coverage

I am installing NYC code coverage tool and setting report path, getting "throw er; // Unhandled 'error' event" when try to set up.
I am hitting following command and getting above error
NODE_ENV=TEST APPLICATION=TEST VAULT_ROLE_ID=$TEST VAULT_SECRET_ID=$TEST VAULT_PATH=TEST PORT=1234 /usr/local/bin/nyc cover --report=json-summary --report=html --report=text node $LOCATION_OF_APP.js

Related

FAILURE: Build failed with an exception

I'm trying to run my app from inside Visual studio code, but every time I try i get this error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
java.util.concurrent.ExecutionException: com.android.builder.utils.SynchronizedFile$ActionExecutionException: java.io.IOException: com.android.ide.common.signing.KeytoolException: Failed to create keystore.
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
Although I searched on Google, but I did not get a suitable solution to my problem

The error output was: An unhandled exception occurred: Cannot find module '#angular-devkit/build-angular/package.json'

I have created an Angular project with ASP.NET Core in Visual Studio and when I run the project then I catch below error :
The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: An unhandled exception occurred: Cannot find module '#angular-devkit/build-angular/package.json'
How can I solve this problem?
Any help will be appriciated!
add below mentioned dependency in dependencies (package.json) and run "npm install"
"dependencies": {
"#angular-devkit/build-angular": "^0.901.1",
------------------------------------------
}

Robot framework - How do I see the output of a command executed in a shell?

I would like to use the Robot framework to automate a step where the next command is executed in a cmd:
docker-compose logs --no-color --tail=1 the-server
The output of the previous command will be the log of the server named the-server in the docker-compose.yml file.
After I would like to check if the response of this command has the string Started the-server, to check if the server is up.
I'm using the next robot file:
*** Settings ***
Library Process
Library OperatingSystem
Suite Setup log running on ${properties.hostname}
Suite Teardown Terminate All Processes kill=True
Variables C:/Users/TheUser/Desktop/CheckOutRegression/properties.py
*** Test Cases ***
Check if the-server is up
${result} Wait Until Keyword Succeeds 10x 20s Check The-Server
*** Keyword ***
Check The-Server
${resultOfcmd} Run Process docker-compose logs --no-color --tail\=1 the-server shell=yes cwd=${properties.pathToDocker}
Should Contain ${resultOfcmd} 'Started the-server' PASS
Log To Console ${resultOfcmd}
The test-case is always failing with the error:
Keyword 'Check The-Server' failed after retrying 10 times. The last error was: TypeError: 'ExecutionResult' object is not iterable
also I'm not sure if the variable {resultOfcmd} contains the output of the command docker-compose logs --no-color --tail\=1 the-server.
Can anyone help?
Check Process library documentation about Result object from Run Process keyword:
https://robotframework.org/robotframework/latest/libraries/Process.html#Result%20object
You get your results from ${resultOfcmd.stdout}.
You should also use Log To Console before failing keyword to see result before test fails.
Log To Console ${resultOfcmd.stdout} console=yes

Jenkins Console Output don't show all the build info

When I build a code in command line, the command show an error and stop the build, but when i do the same in jenkins, the jenkins doesn't show the error and and show that the code was builded with sucessful.
Looking at the same point of the code that the error happened, the command line give me this following information:
"libs\init\InitData.c", line 92: error #65: expected a ";"
++src
^
Error: build failed
and in Jenkins there is a blank space.

BrowserifyRails::BrowserifyError in Pages#index

I am new to Ruby on Rails. I have upload code from local to aws with nginx (passanger). Everytime I facing this error(showing in picture enter image description here).
Error while running `/var/www/4free-backend/node_modules/.bin/browserifyinc -t babelify --fast --list --cachefile=/var/www/4free-backend/tmp/cache/browserify-rails/browserifyinc-cache.json -o "/var/www/4free-backend/tmp/cache/browserify-rails/output20180813-6665-tzjoay" -`:
events.js:141
throw er; // Unhandled 'error' event
^
Error: EMFILE: too many open files, open '/var/www/4free-backend/node_modules/material-ui/package.json'
at Error (native)

Resources