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

NPM error on install #49

Open
mdathersajjad opened this issue Feb 9, 2021 · 7 comments
Open

NPM error on install #49

mdathersajjad opened this issue Feb 9, 2021 · 7 comments

Comments

@mdathersajjad
Copy link

Installing clearbit via npm install in heroku causes ssh error. I faced this issue previously it was resolved the next day without any changes. I have attached the logs which it tries to execute.

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/clearbit/needle.git
npm ERR! 
@erunion
Copy link

erunion commented Feb 21, 2021

We're seeing a variant of this also on Heroku:

-----> Building on the Heroku-20 stack
-----> Fetching heroku/nodejs buildpack...
       buildpack downloaded
-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_PRODUCTION=false
       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=test
       NODE_MODULES_CACHE=true
       
-----> Installing binaries
       engines.node (package.json):  14.15.1
       engines.npm (package.json):   ^7
       
       Resolving node version 14.15.1...
       Downloading and installing node 14.15.1...
       Bootstrapping npm ^7 (replacing 6.14.8)...
       npm ^7 installed
       
-----> Restoring cache
       Cached directories were not restored due to a change in version of node, npm, yarn or stack
       Module installation may take longer for this build
       
-----> Installing dependencies
       Installing node modules
.       npm ERR! code EINTEGRITY
       npm ERR! sha512-ILokv4FHXmekckGaMQbhjJAxSaGJoOvL5o2f/KyCq3Am4KSxKKrSuk+Y1zyK/L7fgYgYdDZZkJTsqB90pRJuOA== integrity checksum failed when using sha512: wanted sha512-ILokv4FHXmekckGaMQbhjJAxSaGJoOvL5o2f/KyCq3Am4KSxKKrSuk+Y1zyK/L7fgYgYdDZZkJTsqB90pRJuOA== but got sha512-ztxroZmgQuCUu1hxQh8qqrYwJLfI6mjZTBrXCpHxIFwGo9yRnWEEDijBFXhpRtyf2W31GJ4WBF2ouszZuldYEg==. (20912 bytes)
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.5wMDl/_logs/2021-02-21T06_40_54_130Z-debug.log
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
       
       Love,
       Heroku

The failing integrity check also coming from clearbit/needle.

@pkprosol
Copy link

Any updates on this? It's happening every other time I update node packages, and might mean I can't use Clearbit going forward.

@pkprosol
Copy link

pkprosol commented Apr 27, 2021

Actually I think I just solved this by using more recent versions of node as follows:

  "engines": {
    "node": "15.12.0",
    "npm": "7.6.3"
  }

@mdathersajjad
Copy link
Author

@pkprosol just remove the package and directly call the API using axios or fetch. As for the original concern the problem doesn't seem to be with package. Just remove the package-lock.json and try to deploy it will work.

@rdoyle99
Copy link

Having this same issue - deploying on Vercel. Only recently.

@lino-levan
Copy link

Hey All,
Just wanted to explain my workaround for the issue. Looks like clearbit is using an ancient version of needle for some reason. It seems to work fine on my computer but refuses to deploy anywhere. My solution was replacing it with the open source maintained version found here.

Steps to fixing this (from my experience):

  1. Deleted your package-lock.json
  2. Run npm install --save tomas/needle
  3. In node_modules/clearbit in package-lock.json, replace the dependency on needle to github:tomas/needle
  4. In clearbit later down in the file replace the needle dependency with github:tomas/needle

Not sure if steps 3 or 4 are needed but these 4 steps worked for me. Hope this helps anyone else who runs into this issue! See attached pictures if you are having trouble understanding steps 3 and 4.

Screen Shot 2021-07-15 at 11 00 59 AM

Screen Shot 2021-07-15 at 11 01 24 AM

I hope that clearbit gets around to fixing it because it seems like such an easy fix.

@t0mstah
Copy link

t0mstah commented Sep 23, 2021

#50 needs merge @davidlumley

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

6 participants