5

I'm trying to install JSS on a VM. When I run the install code, I get the following warnings:

PS C:\dev> npm install -g @sitecore-jss/sitecore-jss-cli
C:\Users\sitecore\AppData\Roaming\npm\jss -> C:\Users\sitecore\AppData\Roaming\npm\node_modules\@sitecore-jss\sitecore-jss-cli\dist\bin\jss.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\@sitecore-jss\sitecore-jss-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @sitecore-jss/sitecore-jss-cli@9.0.6
updated 1 package in 8.154s`

Afterwards, when I try to test the installation, I get the following error:

PS C:\dev> jss --help
jss : The term 'jss' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ jss --help
+ ~~~
+ CategoryInfo          : ObjectNotFound: (jss:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

I can see that the files have installed at the location listed, but my machine never recognizes JSS commands. I tried installing locally in the dev folder as well, but I get the same error.

8

A couple things to try:

  1. After global install, close/open your console. Sometimes console instances will cache path info.

  2. Ensure that your PATH environment variable has your global npm cache folder listed.

  • #2 was the solution. Thanks! – Andrew Aug 13 '18 at 22:49
  • #2 worked. I have added it to system variables instead of user variables. – AlokBhatt Jan 23 at 6:04
0

Kindly find Jan Bluemink's answer that solved my issue:

https://stackoverflow.com/questions/52626472/jss-is-not-recognized-as-an-internal-or-external-command

  • Check your environment path variable. Default the npm location on Windows is C:\Users{user}\AppData\Roaming\npm

  • There you found a jss.cmd and the node_modules\@sitecore-jss folder

  • To fix the "jss" is not recognized as an internal or external command, operable program or batch file." error add the npm location to your path or shortly %AppData%\npm

  • To add somethings to the path go to control panel -> System and Security -> System -> Advanced System Settings then environment variables.

If you cant found the npm location try

npm config get prefix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.