Open Sweetdevil144 opened 1 month ago
That second error log doesn't look like linting error you just need to do npm i and install all the packages first and about first error log we can change it to something like
linebreak-style: ["error", (process.platform === "win32" ? "windows" : "unix")]
in .eslintrc.yml
I'd like to make changes if needed // @davidkel
We can't proceed with these changes. This is not a valid .yml
syntax. First, you'd have to change the .eslintrc.yml
to .eslintrc.js
to apply these changes. Afterhand, using .yml
is much more preferred than using .js
template. Notice how the previous developers have favoured the utilization of .yml
files THROUGHOUT the project.
That second error log doesn't look like linting error you just need to do npm i and install all the packages first
It's an error that arises EVEN after I changed the configs
as you have described.
We can't proceed with these changes. This is not a valid
.yml
syntax. First, you'd have to change the.eslintrc.yml
to.eslintrc.js
to apply these changes. Afterhand, using.yml
is much more preferred than using.js
template. Notice how the previous developers have favoured the utilization of.yml
files THROUGHOUT the project.
Ofc that was just an idea 🙂 you can very well change that to yml syntax
Sorry but windows is not a supported platform for caliper development. It can be made to work (and it would not require a change to the eslint rules which should remain as they are) but we don't document how and don't have the bandwidth to maintain a windows development environment. It will be left as an exercise to the contributor to sort out for themselves.
As a windows pro user you have loads of alternatives here
There is also the option of using dev containers (there is a extension you can get for vscode to provide that support) directly from windows but then it will try to use the windows file system for the repo which means you need to have made sure you sorted out your git environment to properly clone a repo (see https://hyperledger-fabric.readthedocs.io/en/release-2.5/prereqs.html#git-for-windows-optional) otherwise linting will fail.
For you I think option 1 is by far the best and easiest approach.
Also one further thing, please note that node js 21 is not a supported node runtime as it is not an LTS version. We currently support Node 18 and 20 LTS versions. Node 22 will move to LTS around October/November time this year and at that point we would need to look into being able to support that version.
Which Caliper version are you using?
latest
Which Node.JS version are you using?
v21.7.3
Which operating system are you using?
Windows 10 Pro
Please provide some context for your error. For example, when did the error occur? What were you trying to achieve, and how?
While setting up the project on a Windows machine, I encountered an issue with the ESLint configuration. The project is set up to use Unix-style linebreaks (LF), which works fine on Unix-based systems. However, when the project is set up on a Windows machine, ESLint throws an error because Windows uses a different linebreak style (CRLF).
I've been creating tests for the Project and recently switched to Windows from MacOS. Hence, facing these issues.
What was the observed incorrect behavior?
The project should be set up without any ESLint errors on both Unix and Windows systems. However, this was not observed when testing was performed.
Please provide the error logs and their surroundings.
Please provide your benchmark configuration file content, if possible.
No response
Please provide your network configuration file content, if possible.
No response
Please provide your workload module content, if possible.
No response
Please provide any additional information you deem relevant to the error.
Error originates from
.eslintrc.yml
configs at following lines :Locally, I tried changing it to
windows
but was encountered with yet another error as follow when I rannpm run test
: