In my project 'react-scripts' is not recognized as an internal or external command - npm-install

'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
I have tried to delete the node module folder and again install it by the npm install command.

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'

'ch5-cli' is not recognized as an internal or external command, operable program or batch file

Even after installed
npm i #crestron/ch5-utilities-cli
ch5-cli giving below error
'ch5-cli' is not recognized as an internal or external command,
operable program or batch file.
as per document https://www.npmjs.com/package/#crestron/ch5-utilities-cli
It is worked when installed globally as below
npm install -g #crestron/ch5-utilities-cli

rimraf installs successfully but rimraf command not found on Windows

I've installed rimraf several times and on several machines. It installs the package successfully. When I'm using rimraf command, it errors out as "'rimraf' is not recognized as an internal or external command, operable program or batch file."
I've tried installing as administrator and user, using both npm and yarn. It installs well as you can see in the below code. But the command is not recognized.
npm install -g rimraf
C:\Users\UserName\AppData\Roaming\npm\rimraf -> C:\Users\UserName\AppData\Roaming\npm\node_modules\rimraf\bin.js
+ rimraf#2.6.3
updated 1 package in 1.695s
rimraf
'rimraf' is not recognized as an internal or external command,
operable program or batch file.

How to run test in nightwatch?

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.

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;