how to fix 'jspm' is not recognized as an internal or external command, operable program or batch file - jspm

I install jspm in https://github.com/jspm/jspm-cli/wiki/Getting-Started.
npm install jspm -g.
It run.
and I call it: jspm install, it not run,cmd notice "'jspm' is not recognized as an internal or external command, operable program or batch file."
help me, please!

Adding %appdata%\npm in environment variables under PATH worked for me.

I was getting the same error and what I have tried and worked for me was to start cmd.exe as an administrator.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>cd C:\dev\GitHub\JspmTest
C:\dev\GitHub\JspmTest>jspm -v
0.15.7
Running against local jspm install.
C:\dev\GitHub\JspmTest>

I had to add a PATH entry to my windows user env vars, not system.
System was not expanding %APPDATA% because APPDATA was set in user env vars.
Then add %appdata%\npm to PATH in user env vars
JSPM was then accessible anywhere from command.
The entry in user PATH is appended at the end of system PATH, you don't lose your system PATH.

Related

Running npm in cmd giving me errors, I just installed nodejs msi on windows

I installed nodejs in Windows system from official website and npm giving errors:
CALL "C:\Program Files\node js\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not
recognized as an internal or external command, operable program or batch file.
I have given all sorts of paths. Please help me.
http://prntscr.com/gso39z
Add the following paths to your PATH environment variable
%USERPROFILE%\AppData\Roaming\npm
C:\Program Files\nodejs\
(note that i have windows 10, where your programs are installed can differ as per your windows version)
To permanently set PATH environment variable, follow these steps:
This PC/ My Computer Properties
Advanced System Settings, (right side)
from popup, click environment variable
select PATH environment variable under system variable, (not user variable) then click edit
Click new, and copy and paste one of the path (given) there.
new again and paste second path
to check if its set or not, goto terminal, and type PATH
note: if you type PATH, its value will be displayed, but if you type %PATH% , each of its value will act as a command input to terminal (windows terminal -_-).
Start the process by being an administrator.
Open up your command prompt as an administrator.
And if you are using older version of node say 6.9, please upgrade to 6.10, it may solve your problem.

Heroku CLI commands are not recognized after installation

I have installed Heroku CLI and git. After installation, I restarted the command prompt. When I run git commands, those are recognized fine. But when I type Heroku commands such as heroku version, they are not recognized.
So I set the path variable to point to the Heroku installation. Now, Heroku commands are working but the git commands have become unrecognized.
What is the actual problem?
Here is the cmd prompt content.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Deva 5>git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
credential.helper=manager
user.email=****
user.name=****
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
gui.wmstate=normal
gui.geometry=888x427+150+150 171 192
C:\Users\Deva 5>heroku version
'heroku' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Deva 5>heroku login
'heroku' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Deva 5>set path="C:\Program Files\Heroku\bin"
C:\Users\Deva 5>heroku version
heroku-cli: Updating to 6.13.1-7bcaf87... 11.6 MB/11.6 MB
heroku-cli/6.13.1-7bcaf87 (windows-x64) node-v8.2.1
C:\Users\Deva 5>git config --list
'git' is not recognized as an internal or external command,
operable program or batch file.
set path="C:\Program Files\Heroku\bin"
By doing that, you replaced your PATH variable to only contain that path. So you essentially broke everything else.
What you usually do is append or prepend the new path to the PATH variable, e.g. like this:
set PATH=%PATH%;C:\Program Files\Heroku\bin
The permanent solution would be to edit your Windows to include that path to the Heroku executables by default. See this question on SuperUser for more information and instructions: What are PATH and other environment variables, and how can I set or use them?
Just close the vs code, command prompt and all the browser.
And restart your pc. Then open your cmd,
go the project file and writr "heroku login"
it will work

'CALL "C:\Program Files\nodejs\\node_modules \npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com mand,

C:\Users\MNE GO DIGITAL>npm
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules
\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com
mand,
operable program or batch file.
i have installed nodejs on c drive
when i hit npm --v also it state this same error
C:\Users\MNE GO DIGITAL>npm
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules
\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com
mand,
operable program or batch file.
please find attachment for more clarification
Error in executing npm on windows 7
I just spend way to long with this issue. I'm not sure how it got set, perhaps during an install, but I changed a System Variable:
Name: ComSpec Value: %SystemRoot%\system32\cmd.exe;prefix=C:\Program Files (x86)\nodejs\node.exe
To this:
Name: ComSpec Value: %SystemRoot%\system32\cmd.exe
And restarted my system and the issue was gone.
#selva,
For start some server with npm, you can use
npm start
A package can be downloaded with the command
npm install <package_name>
For install globally use -g after package name.
If there is no package.json file in the local directory, the latest version of the package is installed.
If there is package.json file, the latest version satisfying the semver rule declared in package.json for that package (if there is any) is installed.
npm only, does not anything. The command wait for something to do, install, help, etc.
If the problem with command npm --v continuous, try uninstall and install again.
Check this solution:
I saw your problem is with npm-cli,
You need to Add C:\Program Files\nodejs to your PATH environment variable. To do this follow these steps:
Go to control panel -> System -> Advanced System Settings then environment variables.
Use the global Search Charm to search "Environment Variables"
Click "Edit system environment variables"
Click "Environment Variables" in the dialog.
In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs. Make sure it is separated from any other paths by a ;.
You will have to restart any currently-opened command prompts before it will take effect.
See more at official documentation here.

Not able to use npm in WIndows

Error message in cmd.exe
Hi
I'm not able to use npm on Windows 8.1 64bit. It shows the error message as in image link. I have installed nodejs v5.7.1
ERROR MESSAGE:
'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules
\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com
mand,
operable program or batch file.
3.6.0
Tried changing PATH variables and installing a fresh copy in a different drive also
Please help.
Thanks
Download Cygwin
Launch Cygwin Terminal as Administrator, then run the following command
curl -L "https://npmjs.org/install.sh" | sh
This will do a fresh install of NPM. It could take a while to download but once the install completed if everything was successful, the last thing printed will be It Worked.
EDIT: Changed from npm-windows-upgrade to Cygwin
Go to your environment variables and on the system variables section remove the ComSpec variable
First delete this two folders
C:\Users\<your user name>\AppData\Roaming\npm
C:\Users\<your user name>\AppData\Roaming\npm cache
Then delete the Comspec system variable.
It works definitely on windows machine.
solution is very simple...open advance windows system settings
next....edit environment variable..in that...open system variable..in that...change comSpec value o C:\Windows\system32\cmd.exe...then press OK

node is not recognized as an internal or external command but is in PATH

Although I've follow suggestions from:
'node' is not recognized as an internal or an external command, operable program or batch file while using phonegap/cordova
Node.js doesn't recognize system path?
‘ant’ is not recognized as an internal or external command...
I'm having an strange issue: Resume, although node path is list in Path, it doesn't find node.
Workflow:
Microsoft Windows [Version 6.3.9600] //Running CMD on windows 8.1
(c) 2013 Microsoft Corporation. All rights reserved.
I followed suggestions in SO, adding variable to Environment Variables, and it's display Ok in Path:
C:\Users\myUser>path
PATH=c:\Program Files (x86)\nodejs ; (...omitted...) //So folder is there
Next line will fail
C:\Users\myUser>call jasmine-node spec
'node' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\myUser>cd "c:\Program Files (x86)\nodejs" //So I move to the folder list before...
But if I move to folder list in Path, then it works OK.
c:\Program Files (x86)\nodejs>call jasmine-node spec
> (...omitted...) //Exec OK.
c:\Program Files (x86)\nodejs>node
> //Exec OK. Waiting...
It seems contradictory.
The nodejs directory in your PATH isn't recognized because there's a space before the semicolon, so Windows is looking for a directory with a space at the end of the name, which doesn't exist.
Error: 'node' is not recognized as an internal or external command
The problem is may be the node is not installed on the machine in which the application is running.
Then install it and set the environment variable for nodejs.
Or
One more reason can be the nodejs path not set in the environment variable.
Check with the following -
open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables -> Path
the nodejs path should be available here.
If not available then add the following:
C:\Program Files (x86)\nodejs
OR
C:\Program Files\nodejs
Now Re-Run the application and the Error got resolved.
;C:\Program Files\nodejs\
Slash after \nodejs\ worked for me
Usually the environment variables are not effective till a system
Restart.
I suggest a System Restart for all those who face the same issue when doing a clean install.
This worked for me.
In Windows, you need to set node.js folder path into system variables or user variables.
1) open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables
2) in "User variables" or "System variables" find variable PATH and add node.js folder path as value. Usually it is C:\Program Files\nodejs;. If variable doesn't exists, create it.
3) Restart your IDE or computer.
It is useful add also "npm" and "Git" paths as variable, separated by semicolon.
If you did npm install jasmine-node -g you should just need to do jasmine-node spec (no call prefix).
If you've checked your PATH, and are sure that the path for node is added properly, then you're likely to face the problem while running node OR npm commands with CLI's other than the default command line interface of the operating system (e.g. Git bash in Windows).
The strange part is that you can check for node -v and npm -v in those CLIs, but for some reasons, they don't work well with those commands (especially when combined with install or update).
Possible Solution
Try running node with the default terminal for your OS.
I faced this issue even after adding node.exe to PATH. I wasn't able to run node command at random locations without running command prompt as administrator.
Solution to this issue is, you have to give full access permissions to this node.exe file for different user types. open the properties of node.exe, go to security tabs, check all the security options to the user on your local machine.
after doing this you should be able to access the node.exe file from any location.
things to check:
open CMD>Go to the directory where node.exe resides > type node -v > :
if it shows the version: Please add the same path (like>
PATH=C:\Programfiles\nodejs\;) in the OS path in environment variable (any of the
system or user variable, both work fine)
if it doesn't recognize, please add a variable PATHEXT=.exe; in the environment
variable (The PathExt is an Environment Variable that stores a list of the file
extensions for the operation system to execute) and save them.
Now open a new command prompt window and check.it must work.
After installing nodejs you have to restart your terminal or IDE .
C:\Program Files\nodejs
adding the path without the semi-colon did it for me...
For the issue which is coming "node' is not recognized as an internal or external command, operable program or batch file.", I have tried updating the path, but the issue didn't resolve. So I uninstalled and installed node.js and it worked for me.
The error:
node-is-not-recognized-as-an-internal-or-external-command
And the following solution:
Set Environment variable NODE_HOME as C:\Program Files\nodejs
Open cmd window and run:
cd "C:\Program Files\nodejs"
npm install connect
npm install -g appium
It's as simple as adding the location of nodejs (C:\Program Files (x86)\nodejs) to your PATH variable and restarting your application with "Run as administrator".

Resources