Closed psankhe28 closed 2 months ago
As said previously you also need to update package-lock.json. You can't just remove it from package.json. Please make sure your code base is upto date before doing so as large changes have been made to package-lock.json recently
I have added the updated package-lock.json too.
@psankhe28 unfortunately it's not that simple as package-lock.json contains the complete dependency tree, so unless you really know what you are doing I would suggest you don't edit package-lock.json and regenerate the package-lock.json using the standard npm commands. Make sure you are using the latest node 18 which should give you npm 8.19.4 or later.
Node 18.18.0 would work or it should be strictly 18?
@psankhe28 The latest version I am using is node 18.20.2, Caliper packages state 18.19.0 or higher. So install the latest node 18 version available. Suggest you use nvm
to manage your node installations (unless you are on windows but then I would advocate using wsl2 rather than native windows for caliper development). https://github.com/nvm-sh/nvm
@psankhe28 The latest version I am using is node 18.20.2, Caliper packages state 18.19.0 or higher. So install the latest node 18 version available. Suggest you use
nvm
to manage your node installations (unless you are on windows but then I would advocate using wsl2 rather than native windows for caliper development). https://github.com/nvm-sh/nvm
I am using windows and nvm too. The node version I have downloaded is 18.18.0. Should I switch to wsl?
@psankhe28 So I see there is an nvm for windows. I've not used it but I would hope it works similar to the bash version of nvm. So it should allow to install a newer version of node 18 and be able to switch to it and make it the default as well. Just try nvm install 18.20.2
if you want to install a specific version. There should be that version available for windows. But node 18.18 isn't going to work as npm will reject it as the package.json files declare a newer version. I don't think anyone has tried to use native windows to develop with caliper. I don't as my focus is fabric and running fabric on windows is an interesting excercise in itself. I use wsl2.
Node version: 18.20.2 Npm version: 10.5.0
Yep, looks good.
Checklist
Issue/User story
1365
Steps to Reproduce
1. 2. 3. 4.
Existing issues
Design of the fix
Validation of the fix
Automated Tests
What documentation has been provided for this pull request