How to run test in nightwatch? - npm

I just installed git clone https://github.com/nightwatchjs/nightwatch.git and when I run :
npm run unit-tests
from the commandline in windows I get an error:
> ./bin/nightwatch -c test/nightwatch.json
'.' is not recognized as an internal or external command,
operable program or batch file.
Got a sneaky feeling it will work in OSX but can I run this in windows in the commandline?

Found it had to put "node" in front of it.

Related

'..' is not recognized as an internal or external command, operable program or batch file. (lite-server)

I am following this truffle pet-shop tutorial
When i try npm run dev i get the following error message:
> pet-shop#1.0.0 dev
> ../../../Desktop/BlockchainTechnology/pet-shop-tutorial/node_modules/.bin/lite-server
'..' is not recognized as an internal or external command,
operable program or batch file.
The folder is not located in Desktop.
I have already tried npm install lite-server#2.3 --save-dev
I downloaded the project from a friends git, the .gitignore only includes node_modules/
I found the issue.
The package.json files run script had stored the local path from my friends computer.
So i changes from:.
run : '../../Desktop/project/node_modules/lite_server'
to
run : 'lite_server'

Building ngx-bootstrap locally

Simple, I cloned the repository of ngx-bootstrap and tried to build it locally.
To execute npm install to took me about 4 hours (because of the infinite problems which I get)
after a huge effort, I managed to install the packages.
then comes the next step npm run build here I faced with the following problem
Building collapse module
Error: Command failed: C:\WINDOWS\system32\cmd.exe /q /s /c "npm run dist-to-modules"
'cp' is not recognized as an internal or external command,
operable program or batch file.
I understand that the cp is Linux based command and it will not work in windows, I tried to change to play with the command in the script section in the package.json but without luck, it did not work.
my question is, if somebody wants to build ngx-bootstrap on Windows, why there is no guide for them to do that, why it is only for Linux?
how should I change the following command
"dist-to-modules": "cp -R ./dist/. ./node_modules/ngx-bootstrap"
to make it work on windows?
I am really frustrated, building a library should not be such a hard task
You have to use copy instead of cp. Just update the script.
Oh yes, we had an issue with the Windows build, and, Barry helped with that :)
Gonna be fixed in 6.1.0 version, which will be released in a few weeks, I think, or, earlier

react-native install error using the command in Cmd

I encountered an error:
'npm' is not recognized as an internal or external command, operable
program or batch file.
I am trying to install React native using the script:
"npm install -g react-native-cli"
but it is not working,
I used the node.exe file from: "https://nodejs.org/en/download/current/" with a 64-bit Windows Binary (.zip) version, getting the message: "npm should be run outside của thay đổi node, trong bạn thiết bị thường.
(Press Control-D to exit.) "
I have read some similar questions, but I have not found my answer yet.
That's because either there's some issue with your node installation or the path is not added. Firstly check if the path is added or not(Please follow the Link it might come in handy for you). If they are alright and you are still facing the issue let me know.

How to run ng serve at cmd prompt

When I run ng serve at cmd prompt I get an error saying
'ng' is not recognized as an internal or external command, operable program or batch file.
I've tried 'ng serve' and "ng serve" but neither are working. I've noticed that npm start does run ng serve though, but I was wondering how I could get ng serve to run also.
Thanks
For running ng serve, be safe to start the cmd prompt in the right file directory, e.g. ng5 (where angular.js is)

running bower from TeamCity (Windows)

I've got a set of build steps in a project (Team City 9.0c)
One of them is running bower install which is a simple command line execution with no parameters.
Bower is installed on the system (I can run it just fine from the command prompt on the machine) but I get the following error
[10:47:35][Step 2/7] Starting: D:\TeamCity\buildAgent\temp\agentTmp\custom_script8385462966123630321.cmd
[10:47:35][Step 2/7] in directory: D:\TeamCity\buildAgent\work\5d43cd6017ab83d4\website\Amaze.Web
[10:47:37][Step 2/7] 'bower' is not recognized as an internal or external command,
[10:47:37][Step 2/7] operable program or batch file.
[10:47:37][Step 2/7] Process exited with code 1
[10:47:37][Step 2/7] Step Bower (Command Line) failed
I've seen this before where PATH is not set to the location of the npm binaries in c:\users\xxxx\roaming\... so the TC user cannot find them, however PATH is correct.
Both npm and grunt work successfully. What could be causing this?
Is the path variable defined a user variable? If so, it should be a system variable which will be used by the TeamCity process.
You haven't written which accounts the build agent runs as.
I had a similar problem and my build agent was running using Local System. I had to create a dedicated windows user account for the teamcity build agent, in the build script I added
npm install -g bower
set path=%path%;c:\path_to_bower_for_this_user;