Closed lvto2000 closed 3 years ago
@lvto2000 I've just tried to install the same package and it seems to work as expected on my end.
It might have been a glitch. However, if you still have this issue, what version of Node and NPM are you using?
Another thing you can try is see if the kin-starter-node works.
That represented a third try. I could see if it were an unknown error but this is pretty straight forward. The file integrity check failed. I will try again but I don't know of a way to check. Is there a way to just download all the files I need vs. after the fact?
That represented a third try. I could see if it were an unknown error but this is pretty straight forward. The file integrity check failed. I will try again but I don't know of a way to check. Is there a way to just download all the files I need vs. after the fact?
I'm not sure if I follow what you are trying. The files for doing the integrity check are managed by NPM, not something we have control over. As you can see in my output it's also something I can't reproduce.
With regards to your last question, you can probably download the source code from this repo and build off of that, but it seems unlikely that the hash is really out of sync.
Can you try running this command through a proxy to see if that changes something? Or maybe use a package manager like Yarn to see what results that gives?
I downloaded the tar file from your Gitlab location using the following on a FEDORA SYSTEM: kin-node-master]# wget https://github.com/kinecosystem/kin-node/archive/refs/heads/master.zip
Unzipped unzip master.zip
Changed to directory cd kin-node-master/
Ran your command on two separate machines multiple times: npm install @kinecosystem/kin-sdk-v2
Got this response on an older FEDERA SYSTEM:
**npm ERR! code ENOSELF npm ERR! Refusing to install package with name "@kinecosystem/kin-sdk-v2" under a package npm ERR! also called "@kinecosystem/kin-sdk-v2". Did you name your project the same npm ERR! as the dependency you're installing? npm ERR! npm ERR! For more information, see: npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-06-10T21_36_49_437Z-debug.log**
When I change the package name in the package.jason file to someting other that the same name then I get the same response as the NEWER FEDORA SYSTEM below
Got this response on a NEWER FEDORA SYSTEM:
**npm install @kinecosystem/kin-sdk-v2 npm WARN tarball tarball data for @kinecosystem/agora-api@https://registry.npmjs.org/@kinecosystem/agora-api/-/agora-api-0.26.1.tgz (sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA==) seems to be corrupted. Trying again. npm WARN tarball tarball data for @kinecosystem/agora-api@https://registry.npmjs.org/@kinecosystem/agora-api/-/agora-api-0.26.1.tgz (sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA==) seems to be corrupted. Trying again. npm ERR! code EINTEGRITY npm ERR! sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA== integrity checksum failed when using sha512: wanted sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA== but got sha512-obI+cNSPC51cr4ZxH7DzgCG6PB46tbVSVrSu0gswdrIxKYKBxe4VLpkR/0e6fK59fgWKPzIIIy+QDsyBC2toaA==. (68051 bytes)
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-06-10T21_47_19_697Z-debug.log**
You know everything I know at this point. I have tried all the ways I can think of to get it installed. Oh by the way.
NEWER FEDORA SYSTEM STATS:
[root@webserver kin-node-master]# node -v
v14.17.0
[root@webserver kin-node-master]# npm -v
7.14.0
OLDER FEDERA SYSTEM STATS: [root@localhost kin-node-master]# node -v v8.12.0 [root@localhost kin-node-master]# npm -v 6.9.0
Hi @lvto2000,
The error below indicates what's wrong, you try to download the repo and install the same package in that project, that will not work.
npm ERR! Refusing to install package with name "@kinecosystem/kin-sdk-v2" under a package
npm ERR! also called "@kinecosystem/kin-sdk-v2". Did you name your project the same
npm ERR! as the dependency you're installing?
Also, we don't support unsupported Node versions (v8.12.0) so please test it on your 'NEWER' system.
Can you test the following and tell me what the output is (on the NEWER system):
cd /tmp
mkdir test-kin
cd test-kin
npm init -y
npm install @kinecosystem/kin-sdk-v2
Ok you are the man. It worked that way.
So I installed incorrectly? I should not have downloaded it from GitHub first then switched to that directory to run the command the npm install @kinecosystem/kin-sdk-v2 ? If so it seems odd because when I unzip the master.zip then switch to the kin-node-master, those are the instructions in the README.md file in that directory. They are also in the README.md file on the github site. Did I miss something?
Ok you are the man. It worked that way.
So I installed incorrectly? I should not have downloaded it from GitHub first then switched to that directory to run the command the npm install @kinecosystem/kin-sdk-v2 ? If so it seems odd because when I unzip the master.zip then switch to the kin-node-master, those are the instructions in the README.md file in that directory. They are also in the README.md file on the github site. Did I miss something?
Great to hear it worked!
What you tried with downloading master.zip
and extracting, is installing the package into itself. The instructions in the README are explaining how to use the package from NPM - not how to work with the source code in this repo. I hope that makes it a bit clearer!
Again thanks so much for the help in pointing out the areas I may have missed.
Here's the thing though. The OLD SYSTEM did give me a clue to this problem. However, I tried to correct and did the exact same thing you recommended before you provided it. At that time the process seemed to work, but that resulted in an empty folder. I assumed that it either didn't work or used the package.json file in the folder right above it then installed in the node_modules in that folder. On the NEW SYSTEM, the error was not the same. It was a hash error that had nothing to do with the real problem so it didn't occur to me to try the same thing as I did on the OLD SYSTEM.
Recommend an edit to the GitHub instructions. I get it. You programmers have your own language that everyone should easily get, especially newbies right? However, this one is a bit murky even for us more seasoned, jack of all trades types. I recommend adding or editing just the couple of the command lines you sent me that worked and include in a new README.md that says:
NOTE: Do not use these instructions if you intend to download the source code above. mkdir kin-node-master cd /mkdir kin-node-master npm init -y npm install @kinecosystem/kin-sdk-v2
Thanks for the feedback @lvto2000 - we will revise the README soon and point to https://kintegrate.dev/tutorials/getting-started-node-sdk/ as the first starting point for new developer. That documentation should help with the people that are just starting with Node.
[root@webserver kin-node-master]# npm install @kinecosystem/kin-sdk-v2 npm WARN tarball tarball data for @kinecosystem/agora-api@https://registry.npmjs.org/@kinecosystem/agora-api/-/agora-api-0.26.1.tgz (sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA==) seems to be corrupted. Trying again. npm WARN tarball tarball data for @kinecosystem/agora-api@https://registry.npmjs.org/@kinecosystem/agora-api/-/agora-api-0.26.1.tgz (sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA==) seems to be corrupted. Trying again. npm ERR! code EINTEGRITY npm ERR! sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA== integrity checksum failed when using sha512: wanted sha512-jAqhAwYHbgVoCvnuy/uIckip82skGcp5kVQgIaAB4OBMpO2WelanoWJ5B4L0BgNRbg8AVRi4ikb0vB7S4iKAaA== but got sha512-obI+cNSPC51cr4ZxH7DzgCG6PB46tbVSVrSu0gswdrIxKYKBxe4VLpkR/0e6fK59fgWKPzIIIy+QDsyBC2toaA==. (68051 bytes)
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-06-09T21_02_27_734Z-debug.log