Skip to content
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

Corrected paths to node_modules folder used by benchmark #971

Closed
wants to merge 1 commit into from
Closed

Corrected paths to node_modules folder used by benchmark #971

wants to merge 1 commit into from

Conversation

kliu57
Copy link
Contributor

@kliu57 kliu57 commented Nov 16, 2023

Closes #970

Code changes:

  • The following paths were corrected to point to the actual locations of node_modules:

corrected paths

  • Added instructions to Contributing.md to install dependencies for benchmark prior to running it

Screenshot of ./benchmark/benchmark.js successfully running after the fix:

benchmark successful run

@kliu57 kliu57 marked this pull request as ready for review November 16, 2023 21:19
@puzrin
Copy link
Member

puzrin commented Nov 18, 2023

Use npm run benchmark-deps.

"benchmark-deps": "npm install --prefix benchmark/extra/ -g marked@0.3.6 commonmark@0.26.0 markdown-it/markdown-it.git#2.2.1",

@kliu57
Copy link
Contributor Author

kliu57 commented Nov 18, 2023

Use npm run benchmark-deps.

"benchmark-deps": "npm install --prefix benchmark/extra/ -g marked@0.3.6 commonmark@0.26.0 markdown-it/markdown-it.git#2.2.1",

@puzrin after running npm run benchmark deps, node ./benchmark/benchmark.js still does not work.
I also tried npm install --prefix benchmark/extra/ -g marked@0.3.6 commonmark@0.26.0 markdown-it/markdown-it.git#2.2.1

error

@puzrin
Copy link
Member

puzrin commented Nov 18, 2023

Did you try from the project root, as ./benchmark/benchmark.js? Works for me on ubuntu.

@kliu57
Copy link
Contributor Author

kliu57 commented Nov 18, 2023

Did you try from the project root, as ./benchmark/benchmark.js? Works for me on ubuntu.

Yes I was at the root folder markdown-it when I ran it with the command node ./benchmark/benchmark.js.

I tried using VS Code terminal and I tried using git bash:

Screenshot from git bash:
gitbash error

@puzrin
Copy link
Member

puzrin commented Nov 18, 2023

Ok. The current PR is incorrect because benchmarked versions should be installed in the standalone directory as it is now. Probably, something Windows-specific. Unfortunately, can not test Windows now. I'd suggest creating a new issue for the record or creating a new PR, without the intended paths change.

@puzrin
Copy link
Member

puzrin commented Nov 18, 2023

BTW, last screenshot says can not find benchmark module, make sure regular dependencies are installed (npm i)

@kliu57
Copy link
Contributor Author

kliu57 commented Nov 18, 2023

BTW, last screenshot says can not find benchmark module, make sure regular dependencies are installed (npm i)

I have created a new issue as instructed.

Yes, I also tried installing all dependencies using npm i benchmark, npm i commonmark, npm i marked, however it didn't fix the issue (see screenshot in issue showing the attempt).

@kliu57
Copy link
Contributor Author

kliu57 commented Nov 21, 2023

Did you try from the project root, as ./benchmark/benchmark.js? Works for me on ubuntu.

By the way, I recently tried from Ubuntu, but it doesn't work for me. Getting that same error message:

Ubuntu error

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

Successfully merging this pull request may close these issues.

Run ./benchmark/benchmark.js does not work
2 participants