protractor icon indicating copy to clipboard operation
protractor copied to clipboard

--bash: protractor : command not found

Open kaythree opened this issue 9 years ago • 2 comments

Hi,

I Installed Protractor using npm and tried to see the verison protractor --version and i see in command line a message

--bash : protractor: command not found.

I tried to uninstall node and install v7.3.0 and reinstall protractor. Still same issue. Need help. Thanks in advance.

kaythree avatar Dec 31 '16 22:12 kaythree

There's not enough information to understand what you did to install Protractor. Are you installing it as a dependency? Are you installing it globally?

If you are installing it globally, your command to install should be npm install -g protractor. Then from the command line you should be able to type in protractor --version. If this does not work, I would check to see if your path is set up properly for node modules.

Also this support question should be asked on Gitter. For more information please reference https://github.com/angular/protractor/blob/master/CONTRIBUTING.md#questions

Thank you!

cnishina avatar Jan 01 '17 02:01 cnishina

So, everyone keeps speaking of installing Protractor globally. However on extention of and such type of framework in the event that a user does not know which dependencies to install, there needs to be some maintenence in package.json.

In theory, all that is required is to install Node JS and do an npm install in the project folder and viola! it should work.

However what I'm repeatedly seeing as resolutions to this question is the approach of installing it globally which does solve the problem but leaves the sticking point as to why cannot it resolve the dependency for Protractor locally.

dhavewala avatar Jun 17 '20 12:06 dhavewala