-
Notifications
You must be signed in to change notification settings - Fork 821
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
compile and test fail with lerna deprecated attribute #4556
Comments
The parameter `useWorkspaces` was removed on [lerna](lerna/lerna#3695), and trying to compile (`npm run compile`) or test (`npm test`) fails with the error: ``` lerna ERR! ECONFIGWORKSPACES The "useWorkspaces" option has been removed. By default lerna will resolve your packages using your package manager's workspaces configuration. Alternatively, you can manually provide a list of package globs to be used instead via the "packages" option in lerna.json. ``` Once the attribute is removed, the commands work as expected. Fixes open-telemetry#4556
@maryliag Thanks for the issue. IIUC that Line 85 in 3a426e8
I would think any of the FWIW, here is a full run of me doing: clone, npm ci, npm run compile |
Hi @trentm , thank you for getting back to me! I used almost the same commands you did, the difference is that once I notice the message with all the vulnerabilities after the
So I deleted node modules and reinstalled again without trying to fix all vulnerabilities and it on Although without fixing those versions, the
Are all the tests passing for you? |
That particular test (in "packages/opentelemetry-resources") is passing for me. I ran In CI, all the tests are currently passing for all node versions. Hrm. If you do the following, does it still fail for you?
|
Following your commands I get the same test failure, with same error message. I'm on node 21.6.2.
|
I can repro that test failure with 21.6.2. on the lerna versionCurrently we are pinned at lerna 6. But what about lerna 7? (I'm not sure if upgrading to the latest lerna 7 resolves relevant npm audit issues.) There had been an earlier attempt here: #3894 |
And currently this repo isn't testing with Node.js versions greater than v18.18.2 because of #4553 |
That test fails on Node.js v21 because the OTel code is using I'll open an issue. |
In that case, I will open an issue for the test failure, indicating the version, so once the node is updated this can be tracked. For the lerna version, do you want me to close this issue or keep it open (adding clarification on the version), so when lerna gets updated this can be addressed? Because I did open a PR with the fix, so I can keep that open, close, merge, let me know how to proceed: #4557 |
Oh, I was part way through opening an issue for the test failure already. Either works though. |
#4561 added for the test failure. |
I am inclined to closed both this issue and the PR. I am giving a quick try to see if we can update to lerna v7. However, I'm not sure if that even really helps the issue (npm audit fix wanting to update further) the started this. |
I am giving up on this attempt for now. :/ Some notes: I updated to lerna@7 roughly with the following command:
I say "roughly" because that also installs a new lerna dep in some of the workspace packages that didn't currently depend on lerna. I manually backed those out via Now I attempt to run
First lint attempt:
Second attempt:
My uneducated guess is that this is about some modularization in lerna v7, which is now based on nx? |
Thank you for all the details and for trying it out! Also thank you for opening the issue for the test failure! 😄 |
@maryliag Thanks for the issue and PR! Yah, unfortunately the dependency story in this repo, at least while still supporting back to node v14 is complex. |
What happened?
Steps to Reproduce
Cloned the repo, install dependencies and try compile
npm run compile
or testnpm run test
, both will fail with messageSince
useWorkspaces
was removed here, this attribute needs to be removed fromlerna.json
Expected Result
Being able to compile
The text was updated successfully, but these errors were encountered: