Hi I try to get Nodeunit install but when i try and run the nodeunit command it just give the a error. The screenshot below is the error . Any help would be appreciated thanks.
running window 10 and installed with the command 'npm install nodeunit -g'
error on your screenshot shows that you do not have a folder from which nodeunit get tests by default, you must create folder named 'test' in current directory, and and put it in test files
Related
After the npm install, I tried npm start for my project. But it shows an error. How can we fix this error?enter image description here
You're in the wrong directory.
cd 02-exrpess-tutorial
npm install (in case you're missing any dependencies)
npm start
There's no package.json at the directory where you are trying to run the command. Likely you want to run npm start in one of the subdirectories.
first go the correct file directory.
usually cd "app-name"
(It display this after you create a new app).
you're in the wrong file directory ;
I am learning the Automated tests by using selenium web driver + Javascript and node.js.
Everything is working fine when I ran that script.js from the Visual Studio code terminal(by using node main.js)
Problem
I want to schedule this script in the scheduler which automatically tests the login functionality. But when I try to run it from the task scheduler then it gives Error: Cannot find module
Does anybody know how to get rid of this.
To fix Cannot find module errors, install the modules properly by running a npm install command in the appropriate directory as your project's app. ... or delete the node_modules folder and package-lock. json file and re-install it again using the npm install command.
rm -rf node_modules package-lock.json
I am facing problem while integrating Jenkins with protractor script.
Steps:-
1. Created Freestyle project and i selected 'Execute Shell' build option and put protractor --version command.
When i build this simple job it says:- + protractor --version
/tmp/jenkins5545881549145932714.sh: line 2: protractor: command not found
Same applies to npm --version, when i run this command got error :- npm: command not found.
But node --version works fine.
I am using centos7, and when i ran these commands on server command line, it works like charm.
Please Help!!
When I had similar problem, devops fixed it by adding a statement to the command so in the result I had
export PATH=/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/.nvm/versions/node/v10.15.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; cd ui-automation; protractor conf.js
still not completely understand what that does...
If that doesn't help, make sure your protractor and everything else are globally installed
You can get the global package install path via npm config get prefix
NPM_PREFIX=`npm config get prefix`
export PATH=$NPM_PREFIX/bin:$PATH
protractor --version
I am trying to use TodoMVC for comparing performance of some JS frameworks.
I have done a clone of online repository,$ npm install inside main directory, the command $ gulp test-server is executed correctly (application started on http://localhost:8000/) but when i run $ npm run test it shows the following errors which i don't know how to solve
enter image description here -> this is solved
enter image description here -> For the second error i have tried to do
1)npm cache clean --force
2)delete node_modules folder
3)delete package-lock.json
4)npm install
but is still shows the same error and can not run $ npm run test
Cypress installation error -> enter image description here
The port 8000 is already in use, this is written black on white in the image you linked, first line of the error message, so you already have a server using that port. that's what EADDRINUSE means. Kill the process listening at 8000 or launch your tests on another address if possible.
For your second error try to install Cypress globally:
sudo npm install -g cypress
And than try to run the test
I am attempting to use an npm module named timestamp notes.
I have run the following
$npm install timestampnotes
$timestamp
and I get
timestamp:126: command not found: slk
i then tried opening a node repl
$node
>var timestamp = require('timestampnotes');
>timestamp()
and I get basically the same thing, any ideas?
I came across a similar problem. If you are running with zsh on your terminal as opposed to bash, you need to set your 'Shells open with:' option in the Preferences>General to Command (complete path) and set the path to /bin/zsh terminal Command
The same needs to be done if you are running iTerm in place of your default Terminal. You can find this also in your Preferences>Profiles>General and again set Command to /bin/zsh iTerm Command