Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.42k stars 436 forks source link

Windows (10) with node 10.15.3 - Error: read ECONNRESET #824

Open cyeluri opened 5 years ago

cyeluri commented 5 years ago

Hi I updated my nodejs version from 8.11.4 to 10.15.3. I used NCU - U & npm i to upgrade the package.json to latest and getting this error.

npm WARN deprecated gulp-jscs@4.1.0: JSCS is deprecated. Switch to ESLint. npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead: npm WARN deprecated npm i nyc npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives. npm WARN deprecated gulp-util@3.0.1: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated jscs-preset-wikimedia@1.0.1: Deprecated in favour of eslint-config-wikimedia. -- https://phabricator.wikimedia.org/T118941 npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.

phantomjs-prebuilt@2.1.16 install C:\Users\xxxxxx\WebstormProjects\ui-console-5.1-build\node_modules\phantomjs-prebuilt node install.js

PhantomJS not found on PATH Download already available at C:\Users\xxxxxx\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip Checksum did not match Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip Saving to C:\Users\xxxxx\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip Receiving...

Error making request. Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)

Please report this full log at https://github.com/Medium/phantomjs npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN gulp-babel@8.0.0 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.

bolatovumar commented 5 years ago

Getting the same issue.

2019-06-17T17:44:02.6087369Z > phantomjs-prebuilt@2.1.16 install C:\ReleaseAgents\AgentR2\_work\2\s\node_modules\phantomjs-prebuilt
2019-06-17T17:44:02.6087369Z > node install.js
2019-06-17T17:44:02.6087369Z 
2019-06-17T17:44:02.9837441Z PhantomJS not found on PATH
2019-06-17T17:44:02.9837441Z Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
2019-06-17T17:44:02.9837441Z Saving to C:\ReleaseAgents\AgentR2\_work\_temp\phantomjs\phantomjs-2.1.1-windows.zip
2019-06-17T17:44:02.9837441Z Receiving...
2019-06-17T17:53:33.1524041Z 
2019-06-17T17:53:33.1524041Z Error making request.
2019-06-17T17:53:33.1524041Z Error: read ECONNRESET
2019-06-17T17:53:33.1524041Z     at _errnoException (util.js:992:11)
2019-06-17T17:53:33.1524041Z     at TLSWrap.onread (net.js:618:25)
2019-06-17T17:53:33.1524041Z 
2019-06-17T17:53:33.1524041Z Please report this full log at https://github.com/Medium/phantomjs
2019-06-17T17:53:33.1836478Z npm ERR! code ELIFECYCLE
2019-06-17T17:53:33.1836478Z npm ERR! errno 1
2019-06-17T17:53:33.1836478Z npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
2019-06-17T17:53:33.1836478Z npm ERR! Exit status 1
2019-06-17T17:53:33.1836478Z npm ERR! 
2019-06-17T17:53:33.1836478Z npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
2019-06-17T17:53:33.1836478Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-06-17T17:53:33.2462413Z 
2019-06-17T17:53:33.2462413Z npm ERR! A complete log of this run can be found in:
2019-06-17T17:53:33.2462413Z npm ERR!     C:\Users\build\AppData\Roaming\npm-cache\_logs\2019-06-17T17_53_33_199Z-debug.log
2019-06-17T17:53:33.2617699Z ##[error]npm failed with error: C:\Program Files\nodejs\npm.cmd failed with return code: 1
2019-06-17T17:53:33.2617699Z ##[section]Finishing: npm ci (install)
pnmcosta commented 4 years ago

I don't think it's a Windows only issue, also having it on Ubuntu 18.04 (WSL):

root@DESKTOP-OGEA5PL:/usr/bin# npm install phantomjs-prebuilt -g                                                                                                                      /usr/bin/phantomjs -> /usr/lib/node_modules/phantomjs-prebuilt/bin/phantomjs                                                                                                          
> phantomjs-prebuilt@2.1.16 install /usr/lib/node_modules/phantomjs-prebuilt
> node install.js

Considering PhantomJS found at /usr/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
  [======================================--] 94%                                                                                                                                      Received 22866K total.
Extracting tar contents (via spawned process)
Removing /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1562750309433/phantomjs-2.1.1-linux-x86_64 -> /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1562750309433/phantomjs-2.1.1-linux-x86_64' -> '/usr/lib/node_modules/phantomjs-prebuilt/lib/phantom']
  errno: -13,                                                                                                                                                                           code: 'EACCES',                                                                                                                                                                       syscall: 'link',                                                                                                                                                                      path:
   '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1562750309433/phantomjs-2.1.1-linux-x86_64',                                                                            dest: '/usr/lib/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1562750309433/phantomjs-2.1.1-linux-x86_64' -> '/usr/lib/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE                                                                                                                                                              npm ERR! errno 1                                                                                                                                                                      npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`                                                                                                                         npm ERR! Exit status 1                                                                                                                                                                npm ERR!                                                                                                                                                                              npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.                                                                                                                      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.                                                                                    
npm ERR! A complete log of this run can be found in:                                                                                                                                  npm ERR!     /root/.npm/_logs/2019-07-10T09_18_32_926Z-debug.log