microlinkhq / metascraper

Get unified metadata from websites using Open Graph, Microdata, RDFa, Twitter Cards, JSON-LD, HTML, and more.
https://metascraper.js.org
MIT License
2.35k stars 168 forks source link

[enhancement] Lerna-Lite `exec` does not exist, it probably should be replaced with `lerna run` #510

Closed ghiscoding closed 2 years ago

ghiscoding commented 2 years ago

Prerequisites

Subject of the issue

I'm not using your project but I saw you're using the fork of Lerna-Lite that I created and I also saw that your unit test task is failing because you're trying to use exec from Lerna-Lite but that doesn't exist because I did not add that command (I only have 3 out of 15 commands from the original Lerna). So I thought I'd just give you a hint on how to fix your CI, just replace the exec with the run command, however this command exist but is optional so you need to also add the extra package for it @lerna-lite/run

Steps to reproduce

Everytime your CI runs with the new Lerna-Lite, you get this new error thrown

ERR! lerna Unknown arguments: exec, npm, test

Expected behaviour

no error

Actual behaviour

error thrown

Potential Fixes

I don't know what c8 is but I assume that modifying your package.json and add/modify these 2 lines would fix your CI (also as pointed out on top, @lerna-lite/run is optional and must be installed separately)

"devDependencies": {
    "@lerna-lite/cli": "latest",
+    "@lerna-lite/run": "latest",
},
"scripts": {
-   "test": "c8 lerna exec npm run test",
+  "test": "c8 lerna run test",
}

... and thanks for trying out the new Lerna-Lite fork đŸ˜‰ Cheers

Kikobeats commented 2 years ago

Hey, thanks a lot for warning about this!

Since this project is using pnpm, I prefer to use pnpm built-in command for running scripts.

And yea, I'm going to start adopting lerna-lite for the rest of my monorepos!

Thanks for taking care about lerna community.