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

[heft] ERR_ILLEGAL_CONSTRUCTOR when running heft clean #4351

Closed
Niek opened this issue Sep 25, 2023 · 3 comments · Fixed by #4358
Closed

[heft] ERR_ILLEGAL_CONSTRUCTOR when running heft clean #4351

Niek opened this issue Sep 25, 2023 · 3 comments · Fixed by #4358

Comments

@Niek
Copy link
Contributor

Niek commented Sep 25, 2023

See below:

❯ node -v
v20.7.0
❯ npx heft clean
TypeError [ERR_ILLEGAL_CONSTRUCTOR]: Illegal constructor
Question Answer
@rushstack/heft version? v0.61.0
Operating system? macOS
Would you consider contributing a PR? Yes
Node.js version (node -v)? v20.7.0
@iclanton
Copy link
Member

The Heft package's full name is @rushstack/heft.

If you already have Heft installed locally (i.e. - this is actually running our Heft), can you provide a stacktrace?

@Niek
Copy link
Contributor Author

Niek commented Sep 26, 2023

Yes, this is when heft is installed locally. The error was introduced in heft v0.60.0, v0.59.0 is working fine. To reproduce:

$ mkdir -p test/config && cd test
$ echo '{ "name": "test", "version": "0.0.0" }' > package.json
$ echo '{"$schema":"https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json","phasesByName":{"build":{"cleanFiles":[{"sourcePath":"dist"},{"sourcePath":"lib"}]}}}' > config/heft.json
$ npx -y @rushstack/[email protected] clean
TypeError [ERR_ILLEGAL_CONSTRUCTOR]: Illegal constructor

@iclanton
Copy link
Member

This has been fixed in @rushstack/heft v0.61.3.

@iclanton iclanton moved this to Needs triage in Bug Triage Oct 2, 2023
@iclanton iclanton moved this from Needs triage to Closed in Bug Triage Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants