Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing the CLI fails with npm 8 #678

Open
pccowboy opened this issue Aug 4, 2022 · 1 comment
Open

Installing the CLI fails with npm 8 #678

pccowboy opened this issue Aug 4, 2022 · 1 comment

Comments

@pccowboy
Copy link

pccowboy commented Aug 4, 2022

Platform: Linux bunkhouse-7 3.10.0-1160.11.1.el7.x86_64 #1 SMP Fri Dec 18 16:34:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Mercury-Parser Version: N/A
Node Version: v14.15.4
npm -v: 8.16.0

Expected Behavior

$ sudo npm -g install @postlight/mercury-parser
added 1 packages, and audited ## packages in ##s

Current Behavior

$ sudo npm -g install @postlight/mercury-parser
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/postlight/difflib.js.git
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-08-04T00_59_56_748Z-debug-0.log

Steps to Reproduce

  1. npm install npm@latest
  2. sudo npm -g install @postlight/mercury-parser

Detailed Description

From what I am able to tell, this is due to npm/cli#2610. The ssh protocol cannot be used to pull the postlight/difflib repo with npm > 6.

Possible Solution

Change lines 117-119 of https://github.com/postlight/mercury-parser/blob/master/package.json to read:

    "browser-request": "git+https://git@github.com/postlight/browser-request#feat-add-headers-to-response",
    "cheerio": "^0.22.0",
    "difflib": "git+https://git@github.com/postlight/difflib.js",
@chrisgrieser
Copy link

I have the same issue:

npm -g install @postlight/parser
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@postlight%2fparser - Not found
npm ERR! 404
npm ERR! 404  '@postlight/parser@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: (...)

However, npm -g install @postlight/mercury-parser does work, though it does have a bunch of vulnerability warnings and also seems to be an outdated version from a year ago?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants