Foundation-spa-react icon indicating copy to clipboard operation
Foundation-spa-react copied to clipboard

Error during install - Cant find foundation-lib-spa-webpack.git

Open Danielh21 opened this issue 4 years ago • 4 comments

Hi.

I'm getting this error during NPM Install and build, when running setup.cmd

This is the full error:

npm WARN prepare removing existing node_modules/ before installation
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://[email protected]/episerver/foundation-lib-spa-webpack.git
npm ERR!
npm ERR! Host key verification failed.
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!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DanielHollmann\AppData\Roaming\npm-cache\_logs\2021-06-30T07_44_09_314Z-debug.log
1
Run resetup.cmd to resetup solution

I'm noting that it can't find the remote repository. Anyway to fix this? I have already cleared my known_hosts as descripted in this post: https://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository

Danielh21 avatar Jun 30 '21 07:06 Danielh21

Hi,

Can you verify that you're running NPM 7 and the latest LTS from Node.JS? As there's a small change in the handling of git & github references between the NPM6 and NPM7, and the distributed package.json and package-lock.json are generated by NPM 7, this might be the cause of this error.

If you can't upgrade to NPM 7, let me know and I can provide you with the needed updates to the package.json to make it at least install with NPM 6, but there might some other dependency management issues.

https://docs.npmjs.com/try-the-latest-stable-version-of-npm

remkoj avatar Jun 30 '21 08:06 remkoj

My workaround was to go to my .ssh folder (C:\USers\XYZ.ssh) and open up the GIT Bash.

At first i entered ssh -T [email protected] It asked if i would like to continue -> yes

Now the error was gone, but a new error appeared: [email protected]: Permission denied (publickey)

To get rid of it i followed this steps: https://docs.github.com/en/github/authenticating-to-github/troubleshooting-ssh/error-permission-denied-publickey

rojait00 avatar Jul 28 '21 13:07 rojait00

This requires you to set up SSH keys in Github - just had to do it myself as normally just use HTTP for git cloning etc. Some info here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh

The README could do with updating to reflect this step.

MarkMcDonald avatar Oct 01 '21 14:10 MarkMcDonald

To also add to this the SSH created need to have no passphrase as well for the set-up to work.

MarkMcDonald avatar Oct 01 '21 14:10 MarkMcDonald