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

v1.5.0 #157

Merged
merged 1 commit into from
Jul 20, 2024
Merged

v1.5.0 #157

merged 1 commit into from
Jul 20, 2024

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Jul 20, 2024

I can't publish it myself, but suggesting a next release. \cc @vladikoff

@vladikoff vladikoff merged commit bd5917d into main Jul 20, 2024
12 checks passed
@vladikoff
Copy link
Member

Published!

@Krinkle Krinkle deleted the release branch July 20, 2024 19:31
@prathje
Copy link

prathje commented Jul 29, 2024

Hi, thanks for the new release.
I am using the grunt-cli in an old legacy project. Sadly, I got the following error:

/usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:84
var flags = Array.from(process.allowedNodeEnvironmentFlags);
                   ^
TypeError: Cannot convert undefined or null to object
  at Function.from (native)
  at getFlags (/usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:84:21)
  at /usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:142:5
  at /usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:47:14
  at /usr/local/lib/node_modules/grunt-cli/node_modules/v8flags/index.js:70:14
  at FSReqWrap.oncomplete (fs.js:135:15)

I could hotfix it by pinning the version to 1.4.3, i.e., npm install grunt-cli@1.4.3.
I do not think there is any need for you to address this issue, at least not in my case. Just wanted to drop this here in case other people come across a similar error.

@Krinkle
Copy link
Contributor Author

Krinkle commented Jul 30, 2024

@prathje This error comes from the Array.from() function. It does not permit passing undefined.

Array.from(undefined);
// [Firefox] Uncaught TypeError: items is undefined
// [Chrome] TypeError: Cannot convert undefined or null to object
// [Node.js] TypeError: Cannot convert undefined or null to object

In https://github.com/gulpjs/v8flags, this is used to pass process.allowedNodeEnvironmentFlags, which the gulpjs/v8flags package assumes is a Set. Per the Node.js process API this property was introduced in Node.js v10. The latest stable Node.js is v22.

grunt-cli 1.4.0+ requires Node.js 10+ (https://github.com/gruntjs/grunt-cli/blob/main/CHANGELOG.md). I'm glad grunt-cli 1.4.3 works for you, but note that if you are running Node.js 9 or older, this is unsupported even on grunt-cli 1.4.3. You are likely to encounter other errors.

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

Successfully merging this pull request may close these issues.

3 participants