Custom newman reports are not loaded to newman run - npm

I tried to install a custom report 'teamcity' and tried to use it during newman run, and eventhough the package is installed properly, it throws 'reporter could not be loaded' error.
Please find the below details:
Same issue happens when I created my own report locally and tried to use it. But the in-built reporters such as html, cli works fine. Is there an issue here or am I doing something wrong here? Please advise.

Try to install newman-reporter-teamcity globally and run
$ npm install -g newman-reporter-teamcity
Run your collection again.
$ newman run APITesting.postman_collection.json -r teamcity
I had the same issue. This is resolved once I have installed globally.

Related

Why is preact not getting recognized in the terminal even after installing it?

I have installed Preact but it’s not getting recognized in the terminal. First, I went to the official website of PreactJS. The doc says that I have to run npm install -g preact-cli. As I am using Yarn, I ran yarn global add preact-cli. It was installed successfully but with a lot of warnings. Then I ran preact create default first-preact-app. But it's showing an error that "The term 'Preact' is not recognized as a name of a cmdlet, function, script file or executable program."
I have tried force cleaning the cache and reinstalling preact-cli. But it doesn't work. Two of the warnings are that preact and preact-render-to-string have unmet peer dependency. So, I have installed them also. But it still doesn't work.
I have tried running npm and experimented with the commands also. But it didn't work. So, how can I fix the problem?
I have run these commands using Powershell and Git bash on Windows 10. I am trying to install Preact 10.5.12 using Yarn 1.22.5. And a point to be noted, I tried running yarn dlx but it returns an error that "command not found". And when the installation of preact and preact-render-to-string gets finished, yarn gives and warning that they have no binaries.
EDIT: Perhaps, it was a problem with Windows. The problem has gone after reinstalling it.
Your problem almost certainly is that preact-cli was not on your PATH - a list of programs that are globally accessible.
For what it's worth, we don't recommend installing globally. The site may still say that but the repository correctly recommends using npx instead.

The provided "teamcity" reporter does not exist. Check that you have specified the report format correctly

suddenly the test I have in testcafe stop working.
I have try to reinstall again the teamcity reporter with:
npm install -g testcafe testcafe-reporter-teamcity
and
npm install testcafe testcafe-reporter-teamcity
I can see that I have the folder testcafe-reporter-teamcity in my node_modules. But for some reason it cant find it.
Still the error that I get when running my test in local with the command:
testcafe firefox tests -c 4 --skip-js-errors --reporter teamcity
It will return the error:
ERROR The provided "teamcity" reporter does not exist. Check that you have specified the report format correctly.
Found the issue.
Just downgrading the version to
"testcafe-reporter-teamcity": "1.0.10"
seems to work perfectly.. for some reason 1.0.11 is giving this issue.

"--watch is not supported without git/hg" with cygwin jest and git

I would really appreciate help with this.
I have cygwin installed and set up to use the PATH from windows. This has been working great for a ton of node development, but I've recently run into an issue where when I run
yarn jest --watch
I get the following error:
--watch is not supported without git/hg, please use --watchAll
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have installed git and node in windows.
I have found a workaround of using the Command Prompt for running the tests, but would really like to be in one environment.
--watch works only for git repositories.
if you still have issue it is yarn issue npm gives the same error too. delete your node_modules folder, update yarn or npm to the latest version, then reinstall all the packages again.
After some consideration, I thought my workaround could be a valid answer to this question. Although, I would still like to get this working properly in Cygwin.
If you have node and git installed in windows then you can go into the Command Prompt and run yarn test --watch or npm run test -- --watch to accomplish the same thing.
I know it's been a long time. But i was facing the same issue and what resolved it for me was, to change the default terminal of whatever editor you're using to GIT command line. I was using VS Code and changing the terminal to GIT worked like a charm.
Make sure you're running it in a Git repo (initialised with git init). Otherwise it doesn't know how to get only the changed files.
If you don't want to run tests only on changed files, you can use --watchAll, which runs all the tests.
I also encountered this problem, the reason is that I use the mv command to move the project folder, however the command was not removed .git has points such as the beginning of the file
npm run test -- watchAll
Please use watchAll to serve it in a continue way. It will track your changes and re-run the test automatically.
git init
solves the problem, that way it knows the changed files

"Node Commands" printed at prompt when trying to run grunt/ gulp on Windows 7

I've installed nodejs, and have used npm to install grunt using
npm install grunt
When I try to run grunt, I am presented with what appears to be instructions on running node commands: (see image)
the same applies when trying to run gulp
I have done the same steps on other computers, and had no problem running grunt previously
Please suggest ideas as to what's going on.
Thanks
As suggested by Joe Clay, the problem was that there was another app called node.exe whose pathwas in PATH variable before nodejs.
see also:
Nodejs seems to be not working; npm do work, however

Yeoman can't recognize a generator that was installed globally

I ran sudo npm install -g generator-flask and it was saved. I was able to confirm by running npm list-g.
I then run yo flask. Thinking that this was going to work, I instead get an error message:
Error flask
You don't seem to have a generator with the name flask installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 22 registered generators run yo with the `--help` option.
I do as it tells me by running yo --help and discover that the flask generator is not there.
I try this with sudo npm install -g generator-angular-flask and the problem is recreated with Angular Flask. I'm assuming this is going to happen for all the generators which is why I've titled it as Yeoman not recognizing new npm installs.
Does anyone know why this has happened?
A workaround, but does solve the problem:
npm link generator-angular-flask
(as does just installing the module locally)
Usually it is a $NODE_PATH issue, but rather then guessing, run:
yo doctor
and follow the instructions!
Node path is the issue.
To setup path:
export NODE_PATH=$HOME/.node/lib/node_modules/
In my case node is in HOME directory.
I was having a similar issue. Basically Yeoman was showing No installed generators, even if I fired up yeoman and installed the generator again still no luck to run it.
I typed yo doctor and did the changes it recommends, but still no luck...
I then ran
export NODE_PATH=$HOME/.node/lib/node_modules/
Then I fired up Yeoman and still no luck.
I then decide run yo doctor again and voila! New errors. I then saw the final recommendation by the yo doctor so I decide to run it:
export NODE_PATH=$NODE_PATH:/Users/slickstyles/.npm-global/lib/node_modules
After I type yo and guess what I see? All my installed yeoman generators showing and working marvelously.
You can use:
yo doctor
and you will not something like:
npm root value is not in your NODE_PATH
[Info]
NODE_PATH = /home/action/.node/lib/node_modules/
npm root = /home/action/.parts/lib/node_modules
[Fix] Append the npm root value to your NODE_PATH variable
Add this line to your .bashrc
export NODE_PATH=$NODE_PATH:/home/action/.parts/lib/node_modules
Or run this command
echo "export NODE_PATH=$NODE_PATH:/home/action/.parts/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
and try again:
npm install -g generator-webapp
Check if you have NODE_PATH set. To set it open a terminal and type (assuming you have node under /opt/node/ and use bash shell)
echo "export NODE_PATH=/opt/node:/opt/node/lib/node_modules" >> ~/.bashrc && . ~/.bashrc
Once done, run yo doctor. If all is ok, run yo to see your installed generators.