333Matt
333Matt

Reputation: 1188

Why is npm saying PhantomJS not found on PATH, when it is on PATH?

Due to the network security configuration at our company, I have manually downloaded and extracted phantomjs:

Extracted path

I have added this path to my PATH user environment variable:

Environment variables

c:\users\hb31996\appdata\local\enthought\canopy\user\scripts;C:\Users\HB31996\AppData\Local\Enthought\Canopy\User;C:\Users\HB31996\AppData\Local\Enthought\Canopy\User\Scripts;C:\Users\HB31996\PhantomJS\phantomjs-2.1.1-windows\bin\phantomjs.exe;

Yet when I am running npm install for a project on this dev machine, I get the error "PhantomJS not found on PATH". And if I try to simply type the command, "phantomjs", 'phantomjs' is not recognized as an internal or external command, operable program or batch file.

What have I got wrong here?

Upvotes: 0

Views: 10859

Answers (1)

Mike
Mike

Reputation: 161

Try removing the executable file from the PATH, e.g. to simply "C:\Users\HB31996\PhantomJS\phantomjs-2.1.1-windows\bin". PATH should point to a containing folder.

Upvotes: 1

Related Questions