Skip to content

Unable to perform npm install #6

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

Closed
mgroovyank opened this issue May 5, 2024 · 12 comments
Closed

Unable to perform npm install #6

mgroovyank opened this issue May 5, 2024 · 12 comments

Comments

@mgroovyank
Copy link

mgroovyank commented May 5, 2024

Executed command:

npm install --save-dev git+https://github.com/smartcontractkit/chainlink-local.git

Got the following error:


npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/smartcontractkit/chainlink-local.git
npm ERR! Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
npm ERR! [email protected]: 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.

Please check if there are any restrictions on the repo side.

@mgroovyank
Copy link
Author

The issue was on my side.
Had to use personal access token using below command:

npm install git+https://<username>:<token>@github.com/smartcontractkit/chainlink-local.git

Anyone else facing the same issue can either use the personal access token or set up ssh keys.

@andrejrakic
Copy link
Collaborator

Thanks for raising this issue and providing the solution @mgroovyank

I don't know if we can test this approach, but maybe installing via the following command can enforce git installing via https instead of ssh (in case someone else encounters the same error):

npm install --save-dev https://github.com/smartcontractkit/chainlink-local.git

@0xHaku
Copy link

0xHaku commented May 25, 2024

@andrejrakic

I encountered the same initial error as @mgroovyank, and when I tried his solution, I received the following error:

error From https://github.com/smartcontractkit/ccip
error  * branch                  b06a3c2eecb9892ec6f76a015624413fffa1a122 -> FETCH_HEAD
error error: invalid path '.github/actions/setup-create-base64-upgrade-config /action.yml'
error Submodule 'lib/ds-test' (https://github.com/dapphub/ds-test) registered for path 'lib/forge-std/lib/ds-test'
error Cloning into 'C:/Users/haku/AppData/Local/npm-cache/_cacache/tmp/git-cloneVlLm2Y/lib/forge-std/lib/ds-test'...
error fatal: Unable to checkout 'b06a3c2eecb9892ec6f76a015624413fffa1a122' in submodule path 'lib/ccip'

As a result, I couldn't complete the installation.
Could you please consider registering the package on npm?

@andrejrakic
Copy link
Collaborator

@0xHaku can you please tell me:

  • Which command have you run?
  • Which framework do you use (Foundry, Hardhat, Remix)?
  • Do you have @chainlink/contracts-ccip package already installed, and if yes, which command have you used to install it?

Thank you in advance and apologies for inconvenience!

@0xHaku
Copy link

0xHaku commented May 27, 2024

@andrejrakic

Which command have you run?

npm install git+https://0xHaku:<token>@github.com/smartcontractkit/chainlink-local.git --save-dev

Which framework do you use (Foundry, Hardhat, Remix)?

Hardhat

Do you have @chainlink/contracts-ccip package already installed, and if yes, which command have you used to install it?

Yes, via
npm i @chainlink/contracts-ccip

@andrejrakic
Copy link
Collaborator

@0xHaku Thank you! Can you try this one, please?

npm install --save-dev https://github.com/smartcontractkit/chainlink-local.git

@0xHaku
Copy link

0xHaku commented May 27, 2024

@andrejrakic

I tried that, but I got an npm ERR! code 128 error.
Also tried specifying a token, but it returned the same error as before.

I tried it on a new repository on a different PC, but got the same result, so I don't think it's an issue dependent on the PC.
I tried allowing all permissions for the access token, but it didn't work.

@andrejrakic
Copy link
Collaborator

Thank you, @0xHaku! The npm ERR! code 128 error usually indicates a problem with the git process used by npm to install a library. Can you please:

  • Run the git --version command
  • Verify your SSH keys are correctly set up
  • Run the previous command with the --verbose flag:
    npm install --save-dev https://github.com/smartcontractkit/chainlink-local.git --verbose

Thank you!

@0xHaku
Copy link

0xHaku commented May 28, 2024

@andrejrakic

Run the git --version command

I got git version 2.34.1.windows.1

Verify your SSH keys are correctly set up

Succeed

npm install --save-dev https://github.com/smartcontractkit/chainlink-local.git --verbose

I got same 128 error

npm verbose title npm install https://github.com/smartcontractkit/chainlink-local.git
npm verbose argv "install" "--save-dev" "https://github.com/smartcontractkit/chainlink-local.git" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:C:\Users\0xhaku\AppData\Local\npm-cache\_logs\2024-05-27T13_43_08_518Z-
npm verbose logfile C:\Users\0xhaku\AppData\Local\npm-cache\_logs\2024-05-27T13_43_08_518Z-debug-0.log
npm verbose stack Error: An unknown git error occurred
npm verbose stack     at makeError (C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\@npmcli\git\lib\make-error.js:28:13)
npm verbose stack     at C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\@npmcli\git\lib\spawn.js:37:26
npm verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm verbose stack     at async C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\pacote\lib\git.js:258:19
npm verbose stack     at async withTempDir (C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\@npmcli\fs\lib\with-temp-dir.js:21:14)
npm verbose stack     at async C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:512:22
npm verbose stack     at async Promise.all (index 0)
npm verbose stack     at async #add (C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:501:5)
npm verbose stack     at async #applyUserRequestsToNode (C:\Users\0xhaku\AppData\Local\Volta\tools\image\npm\10.8.0\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:470:7)
npm error code 128

I tried with a different GitHub account, but I got the same error.

@andrejrakic
Copy link
Collaborator

Hi @0xHaku, we published the package to NPM at https://www.npmjs.com/package/@chainlink/local

This is still a work in progress, but can you please try installing @chainlink/local like this and let me know whether it solved your issue? Thank you and apologies for the inconvenience!

@0xHaku
Copy link

0xHaku commented Jun 3, 2024

Hi @andrejrakic

The installation from the npm repository was successful!
Thanks for your help!

@andrejrakic
Copy link
Collaborator

@0xHaku great!
Again apologies for the inconvenience. If you have any further feedback or issues do not hesitate to tag me again. Thank you!

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

3 participants