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
lerna cannot locate packages after update from v7 to v8 #3964
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@wasib-sureify |
We've experienced the same issue when upgrading Lerna from v6 to v7. Upgrading to v8 didn't work either. After the update from v6 to v7, Lerna was unable to find the packages. When building the project in a different folder (outside of the git repo), everything worked fine, so it appears to be related to either the folder structure or the repository. After a lot of trial and error I tried to remove the
|
@DannyS-Treetop did you try deleting all node_modules directories and recreating the lock file from scratch? |
Sorry for not including that. Yes I did remove all node_module directories, removed lock file, clone repo again, tried on different machines, etc. The only thing that really helps is moving the entire project to a different folder or removing the .git folder. We're using |
This comment was marked as off-topic.
This comment was marked as off-topic.
Here is my response for
|
@DannyS-Treetop I also tried deleting the .git folder and it did not seem to help either. What's strange is that pnpm install output:
npx lerna list output:
|
@apedroferreira FYI I have hidden all the comments related to your issue, as it is not related at all to the OP. Let's continue the discussion on the PR on your repo. @wasib-sureify Thanks for confirming, nothing seems strange about your environment from what I can tell. Please can you try creating a fresh lerna repo and see if you still have the same issue? E.g. something like mkdir lerna-issue-3964
cd lerna-issue-3964
npx lerna init
npx lerna create -y a
npx lerna create -y b
npx lerna list And see if it returns any packages |
@wasib-sureify @JamesHenry I'm not sure if my issue is the same, but in my case the issue is triggered by a package exclusion rule in |
@weiwei Yes! That was exactly what was happening. I have the same line in my
Output of
|
So I did a bit of digging, and if I'm understanding correctly, it is caused by this line: https://github.com/nrwl/nx/blob/32144bb702b07eddf29ed70055dfbcbcc0f4b11c/packages/nx/src/plugins/package-json-workspaces/create-nodes.ts#L44 I changed it to the following and all the test went fine: if (negativePatterns.every((negative) => minimatch(p, negative))) {
return createNodeFromPackageJson(p, workspaceRoot);
} I would like to submit a PR myself, but |
Current Behavior
Cannot find packages after updating to lerna v8.
We have been using lerna with pnpm workspaces and everything used to work fine. Today I updated lerna to v8 and all of a sudden lerna stopped identifying any packages. Reverting lo lerna v7 makes everything run correctly again.
This is what it shows when I run lerna list
Expected Behavior
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs / Configuration
lerna.json
<!-- Please paste your `lerna.json` here -->
{ "$schema": "node_modules/lerna/schemas/lerna-schema.json", "npmClient": "pnpm", "version": "independent", "command": { "version": { "createRelease": "github", "conventionalCommits": true, "allowBranch": ["main", "*-hotfix"], "message": "chore(release): publish [skip ci]" } } }
lerna-debug.log
Environment
The text was updated successfully, but these errors were encountered: