2

Now I'm having other issues where Protractor is not found after installing using npm -g .

Some background:

I was previously having issues with npm installs, but it works now that I have set the correct proxy settings at the client site - i.e. .npmrc file exists under c:\Users(myUserName) which contains the registry and proxy keys.

For example, I install Protractor as follows :

  C:\Projects\prot-test>npm install -g protractor

  C:\Users\...\AppData\Roaming\npm\webdriver-manager -> C:\Users   \...\AppData\Roaming\npm\node_modules\protractor\bin\webdriver-manager

  C:\Users\...\AppData\Roaming\npm\protractor -> C:\Users\...\AppDataRoam
ing\npm\node_modules\protractor\bin\protractor

  C:\Users\...\AppData\Roaming\npm    `-- protractor@4.0.9

However, as soon as I check the installation, it cannot find it :

C:\Projects\prot-test>protractor --version
'protractor' is not recognized as an internal or external command, operable program or batch file.

****** UPDATE ******

It does appear to be a Win 7 environment issue with PATH not getting updated (i.e. I'm pretty much on lock-down at the client site).

For example, manually navigating to ..\npm directory seems to be required :

C:\Users\..\AppData\Roaming\npm>protractor --version

Version 4.0.9

C:\Users\..\AppData\Roaming\npm>

Your advice is appreciated.... Bob

bob.mazzo
  • 5,183
  • 23
  • 80
  • 149

1 Answers1

2

Yes, its a PATH issue on Windows machines.Make sure if you have below configured in your system variables.

PATH
C:\Program Files\nodejs;C:\Users\<<user>>\AppData\Roaming\npm;

NODE_PATH
C:\Users\<<user>>\AppData\Roaming\npm\node_modules

If it still doesn't work for you still, check if you have all the path semi-colon seperated

AdityaReddy
  • 3,625
  • 12
  • 25