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

lerna ERR! TypeError: Cannot read properties of undefined (reading 'ejs') - lerna version #3535

Closed
grabowsd opened this issue Feb 13, 2023 · 3 comments

Comments

@grabowsd
Copy link

grabowsd commented Feb 13, 2023

Current Behavior

When running npx lerna version patch --no-git-tag-version --no-push --exact --yes we get the following error:

Screenshot 2023-02-13 at 18 19 53

Lerna fails in node_modules/@lerna/version/lib/update-lockfile-version.js on line 28 and 29 as per below:

Screenshot 2023-02-13 at 18 23 18

The issue was introduced in v5.5.0. I believe in this PR: #3308

lerna version works for us as expected with v5.4.3 and all versions above that are broken.

Expected Behavior

node_modules/@lerna/version/lib/update-lockfile-version.js for lerna version should run without any errors.

Steps to Reproduce

Please, let me know if you need additional info.

Failure Logs / Configuration

lerna.json

<!-- Please paste your `lerna.json` here -->

lerna-debug.log

<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->

Environment

@JamesHenry
Copy link
Member

Hi @grabowsd I'm afraid 5.5.0 is significantly behind the latest so this won't be something we can look into.

The good news is there shouldn't be anything preventing you from moving from 5.5.0 to the latest version (6.5.1 at the time of writing) so please do so and you should no longer have any issues.

If you do run into anything on the latest version please open a new issue and fully complete the requested information in the template.

Many thanks!

@JamesHenry JamesHenry closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@grabowsd
Copy link
Author

Hi @JamesHenry,

We have this issue when we use lerna v.6.5.0. I was trying to say that the issue was introduced in version 5.5.0. I would appreciate if you could look into it as at the moment we're stuck on version 5.4.3 and more recent versions are causing the above error. Could you please reopen this ticket?

@JamesHenry
Copy link
Member

@grabowsd The stack trace you have posted above is simply not possible in the 6.5.1, the package structure has been completely refactored. Therefore this issue report is not something which makes sense to continue - honestly, it's totally different, I'm not splitting hairs.

I therefore please request that you update to the 6.5.1 and if you still have the problem, open a fresh issue with all of the information requested by the issue template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants