Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

NPME unpublish 500 #165

Open
jcantosz opened this issue Feb 12, 2018 · 0 comments
Open

NPME unpublish 500 #165

jcantosz opened this issue Feb 12, 2018 · 0 comments

Comments

@jcantosz
Copy link

I am running npme version 4.3.0. I would like to clean up prerelease versions that have been published to a NPME registry.

When I try to unpublish new packages (<24 hr), the command exits with a 0, and the item is removed from the versions list (as seen with npm view).

When I try to unpublish older packages normally, or using --force I get a 500. I know the public registry will not let you unpublish packages >24 hrs old. Is there a setting I need to change to allow this on NPME?

NPM unpublish

$ npm unpublish @<scope>/test-package@0.0.1 --force
npm WARN using --force I sure hope you know what you are doing.
npm ERR! unpublish Failed to update data
npm ERR! code ECONNRESET
npm ERR! network socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jesse/.npm/_logs/2018-02-12T20_25_26_431Z-debug.log

NPM log

$ cat /home/jesse/.npm/_logs/2018-02-12T20_25_26_431Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'unpublish',
1 verbose cli   '@<scope>/test-package@0.0.1',
1 verbose cli   '--force' ]
2 info using npm@5.6.0
3 info using node@v9.4.0
4 warn using --force I sure hope you know what you are doing.
5 silly unpublish args[0] @<scope>/test-package@0.0.1
6 silly unpublish thing { type: 'version',
6 silly unpublish   registry: true,
6 silly unpublish   where: undefined,
6 silly unpublish   raw: '@<scope>/test-package@0.0.1',
6 silly unpublish   name: '@<scope>/test-package',
6 silly unpublish   escapedName: '@<scope>%2ftest-package',
6 silly unpublish   scope: '@<scope>',
6 silly unpublish   rawSpec: '0.0.1',
6 silly unpublish   saveSpec: null,
6 silly unpublish   fetchSpec: '0.0.1',
6 silly unpublish   gitRange: undefined,
6 silly unpublish   gitCommittish: undefined,
6 silly unpublish   hosted: undefined }
7 verbose getPublishConfig null
8 silly mapToRegistry name @<scope>/test-package
9 silly mapToRegistry scope (from package name) @<scope>
10 silly mapToRegistry registry http://<site>:8080/
11 silly mapToRegistry data { type: 'tag',
11 silly mapToRegistry   registry: true,
11 silly mapToRegistry   where: undefined,
11 silly mapToRegistry   raw: '@<scope>/test-package',
11 silly mapToRegistry   name: '@<scope>/test-package',
11 silly mapToRegistry   escapedName: '@<scope>%2ftest-package',
11 silly mapToRegistry   scope: '@<scope>',
11 silly mapToRegistry   rawSpec: '',
11 silly mapToRegistry   saveSpec: null,
11 silly mapToRegistry   fetchSpec: 'latest',
11 silly mapToRegistry   gitRange: undefined,
11 silly mapToRegistry   gitCommittish: undefined,
11 silly mapToRegistry   hosted: undefined }
12 silly mapToRegistry uri http://<site>:8080/@<scope>%2ftest-package
13 verbose request uri http://<site>:8080/@<scope>%2ftest-package?write=true
14 verbose request no auth needed
15 info attempt registry request try #1 at 15:24:15
16 verbose request using bearer token for auth
17 verbose request id 653e5708670bdcec
18 http request GET http://<site>:8080/@<scope>%2ftest-package?write=true
19 http 200 http://<site>:8080/@<scope>%2ftest-package?write=true
20 verbose headers { date: 'Mon, 12 Feb 2018 20:24:15 GMT',
20 verbose headers   'content-type': 'text/html; charset=utf-8',
20 verbose headers   'content-length': '39998',
20 verbose headers   connection: 'keep-alive',
20 verbose headers   'x-powered-by': 'Express',
20 verbose headers   etag: 'W/"9c3e-R7dHMHqSufy+nxCJwC779iWMT3s"' }
21 verbose unpublish removing attachments { integrity: 'sha512-5l6K07/qUu3olWwMejFiw5iyYoVJ8P/c2qKL2ppAaYh11LNLsfgOg8dQ9jeFnjO/Jnjv2szPSP55zWPifMMEZw==',
21 verbose unpublish   shasum: '73c96fc3992eca38d67cacbc7841605d9b5018ca',
21 verbose unpublish   tarball: 'http://<site>:8080/@/@<scope>/test-package/_attachments/test-package-0.0.1.tgz' }
22 verbose request uri http://<site>:8080/@<scope>%2ftest-package/-rev/100-xx
23 verbose request sending authorization for write operation
24 info attempt registry request try #1 at 15:24:16
25 verbose request using bearer token for auth
26 http request PUT http://<site>:8080/@<scope>%2ftest-package/-rev/100-xx
27 http 500 http://<site>:8080/@<scope>%2ftest-package/-rev/100-xx
28 verbose headers { date: 'Mon, 12 Feb 2018 20:24:16 GMT',
28 verbose headers   'content-type': 'application/json',
28 verbose headers   'content-length': '76',
28 verbose headers   connection: 'keep-alive',
28 verbose headers   'x-powered-by': 'Express' }
29 info retry will retry, error on last attempt: Error: cannot unpublish a version that is >24 hours old : 100-xx
30 info attempt registry request try #2 at 15:24:26
31 verbose request using bearer token for auth
32 http request PUT http://<site>:8080/@<scope>%2ftest-package/-rev/100-xx
33 http 500 http://<site>:8080/@<scope>%2ftest-package/-rev/100-xx
34 verbose headers { date: 'Mon, 12 Feb 2018 20:24:26 GMT',
34 verbose headers   'content-type': 'application/json',
34 verbose headers   'content-length': '76',
34 verbose headers   connection: 'keep-alive',
34 verbose headers   'x-powered-by': 'Express' }
35 info retry will retry, error on last attempt: Error: cannot unpublish a version that is >24 hours old : 100-xx
36 info attempt registry request try #3 at 15:25:26
37 verbose request using bearer token for auth
38 http request PUT http://<site>:8080/@<scope>%2ftest-package/-rev/100-xx
39 error unpublish Failed to update data
40 verbose stack Error: socket hang up
40 verbose stack     at createHangUpError (_http_client.js:330:15)
40 verbose stack     at Socket.socketOnEnd (_http_client.js:423:23)
40 verbose stack     at Socket.emit (events.js:165:20)
40 verbose stack     at endReadableNT (_stream_readable.js:1101:12)
40 verbose stack     at process._tickCallback (internal/process/next_tick.js:152:19)
41 verbose cwd /home/jesse/shared/projects/test-package
42 verbose Linux 4.13.0-26-generic
43 verbose argv "/usr/bin/node" "/usr/bin/npm" "unpublish" "@<scope>/test-package@0.0.1" "--force"
44 verbose node v9.4.0
45 verbose npm  v5.6.0
46 error code ECONNRESET
47 error network socket hang up
48 error network This is a problem related to network connectivity.
48 error network In most cases you are behind a proxy or have bad network settings.
48 error network
48 error network If you are behind a proxy, please make sure that the
48 error network 'proxy' config is set properly.  See: 'npm help config'
49 verbose exit [ 1, true ]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jcantosz and others