I'm doing a unit testing for my javascript codes. I prefer to use a headless browser for easier running. It goes well when I installed some dependencies but when I install phantomjs, it has an error.
C:\Phantomjs>npm install -g phantomjs npm WARN deprecated phantomjs@2.1.7: Package renamed to phantomjs-prebuilt. Plea se update 'phantomjs' package references to 'phantomjs-prebuilt' npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie h ttps://nodesecurity.io/advisories/130 C:\Users.ra\AppData\Roaming\npm\phantomjs -> C:\Users.ra\AppDa ta\Roaming\npm\node_modules\phantomjs\bin\phantomjs
phantomjs@2.1.7 install C:\Users.ra\AppData\Roaming\npm\node_modules\ phantomjs node install.js
Considering PhantomJS found at C:\Users.ra\AppData\Roaming\npm\phantomj s.CMD Looks like an
npm install -g
on windows; skipping installed version. Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1//phanto mjs-2.1.1-windows.zip Saving to C:\Users.ra\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-wind ows.zip Using proxy http://.ra:******@proxy:3128/ Receiving...Error making request. Error: tunneling socket could not be established, statusCode=502 at ClientRequest.onConnect (C:\Users.ra\AppData\Roaming\npm\node_mo dules\phantomjs\node_modules\tunnel-agent\index.js:165:19) at Object.onceWrapper (events.js:320:30) at emitThree (events.js:135:13) at ClientRequest.emit (events.js:216:7) at Socket.socketOnData (_http_client.js:470:11) at emitOne (events.js:115:13) at Socket.emit (events.js:210:7) at addChunk (_stream_readable.js:264:12) at readableAddChunk (_stream_readable.js:251:11) at Socket.Readable.push (_stream_readable.js:209:10)
Please report this full log at https://github.com/Medium/phantomjs npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users.ra\Ap pData\Roaming\npm\node_modules\phantomjs\node_modules\dashdash\node_modules' npm WARN { Error: EPERM: operation not permitted, scandir 'C:\Users.ra \AppData\Roaming\npm\node_modules\phantomjs\node_modules\dashdash\node_modules' npm WARN stack: 'Error: EPERM: operation not permitted, scandir \'C:\Users\p ardillo.ra\AppData\Roaming\npm\node_modules\phantomjs\node_modules\dashda sh\node_modules\'', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'scandir', npm WARN path: 'C:\Users\.ra\AppData\Roaming\npm\node_modules\p hantomjs\node_modules\dashdash\node_modules' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! phantomjs@2.1.7 install:
node install.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs@2.1.7 install script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.`
What should I do?