Allure report generation fails with message ''allure' is not recognized as the name of a cmdlet, function..' - mocha.js

I am using Allure report for my WebDriverIO mocha test automation. Report generation was working fine however, it started showing below error while running 'allure generate allure-result' command.
allure : The term 'allure' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
allure genertae
CategoryInfo : ObjectNotFound: (allure:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException```
This is my package.json devDependencies
"devDependencies": {
"#wdio/allure-reporter": "^7.16.11",
"#wdio/cli": "^7.16.13",
"#wdio/local-runner": "^7.16.13",
"#wdio/mocha-framework": "^7.16.13",
"#wdio/spec-reporter": "^7.16.13",
"chromedriver": "^97.0.2",
"mocha-allure-reporter": "^1.4.0",
"wdio-chromedriver-service": "^7.2.6"
},
What could be the reason for this failure and how to handle it?

Run:
npm install -g allure-commandline --save-dev
Resolved the issue for me.
Reference: https://www.npmjs.com/package/allure-commandline
Thanks

Related

I am having issue while opening the cypress, I ma using Cypress for the first time and trying to install

I installed node.js and installed cypress also, but everytime I try to open cypress, I am getting this error:
cypress : The term 'cypress' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is
correct and try again. At line:1 char:1 + cypress open --browser +
~~~~~~~ + CategoryInfo : ObjectNotFound: (cypress:String) [],
CommandNotFoundException + FullyQualifiedErrorId :
CommandNotFoundException
I tried -> npm run cypress:open
and the cypress window says "Not Responsding"
Could anyone please help as I tried everything
I did try adding this in Package.json file
{
"scripts": {
"test": "cypress open"
}
}

Quarkus " Running the application" Tutorial

I try to follow the tutorial for the First Application of Quarkus.
When I try to run this command: ./mvnw compile quarkus:dev:
I've the following error:
The specified path could not be found. "D" is not recognized as an
internal or external command, an executable program or a batch file.
The specified path could not be found.
Exception during "DownloadFile" call with "2" argument (s): "Exception during a WebClient request." In line: 1 car: 282
... pe] :: Tls12; $ webclient.DownloadFile ('https://repo.maven.apache.org/ma ...
CategoryInfo: NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId: WebException
Error: cannot find or load the main class org.apache.maven.wrapper.MavenWrapperMain"
The problem was used the command prompt of Windows instead the Linux Command Line.

Concurrently path failure

Question Description
I'm trying to simultaneously run multiple commands using the Concurrently package.
My package.json:
{
"name": "emojifier",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start-dev": "concurrently -c \"yellow.bold,green.bold\" -n \"SERVER,BUILD\" \"./node_modules/.bin/ts-node-dev server/index.ts\" \"ng build --watch\" \"ng serve\""
}
}
This script works fine on Ubuntu and Mac. However, when running it via CMD or Powershell, I get the error:
[SERVER] '.' is not recognized as an internal or external command,
[SERVER] operable program or batch file.
[SERVER] ./node_modules/.bin/ts-node-dev server/index.ts exited with code 1
Why is this happening and what is a proper work-around? Is this a bug with Concurrently?
Debugging Attempts
When I switch the forward-slashes to back-slashes:
concurrently -c "yellow.bold,green.bold" -n "SERVER,BUILD" ".\node_modules\.bin\ts-node-dev.cmd .\server\index.ts" "ng build --watch" "ng serve"
The error is resolved.
If I remove the ./ prefix from the path name, the error changes to:
[SERVER] 'node_modules' is not recognized as an internal or external command,
[SERVER] operable program or batch file.
[SERVER] node_modules/.bin/ts-node-dev server/index.ts exited with code 1

Specified query type "Query" not found in document when deploying to heroku

I am trying to deploy a typescript-graphql-postgres server onto heroku. The build was successful, however, when run I get the following from heroku logs:
UnhandledPromiseRejectionWarning: Error: Specified query type "Query"
not found in document. 2018-11-08T08:54:52.660051+00:00 app[web.1]: at
/app/node_modules/graphql/utilities/buildASTSchema.js:184:15
Anyone encountered and know the fix?
btw, when I run on my computer, the code works
Resolved. I need to copy graphql files into the relevant modules folders
below is what I added to my package.json for those who run into the same issue
"build": "rimraf dist && tsc && copyfiles -u 1 src/**/*.graphql dist",

Errors using poshgit from Package Manager Console

I have gotten poshgit to work in plain vanilla powershell with no problems. When I run a:
git pull origin master
I get the following good message:
From github.com:bmccord/WebShot * branch master ->
FETCH_HEAD Already up-to-date.
I have also set poshgit up to run form the NuGet Package Manager Console (since it is just a powershell inside of studio). However, when I run the same command, I get:
git.cmd : From github.com:bmccord/WebShot At line:1 char:4
+ git <<<< pull origin master
+ CategoryInfo : NotSpecified: (From github.com:bmccord/WebShot:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError * branch master -> FETCH_HEAD
It looks like it is working, but I also get what looks like an error.
Has anyone seen this before?
You are getting the same message, except that the Package manager console is wrapping the error ( the message that you classify as "good" message, must have been in the standard error)

Resources