Skip to content

fix: replace 'grey' with 'gray' in styleText call for Node.js compatibility#166

Merged
northword merged 1 commit intozotero-plugin-dev:mainfrom
julkusapiens:fix/grey-to-gray-styletext
Mar 14, 2026
Merged

fix: replace 'grey' with 'gray' in styleText call for Node.js compatibility#166
northword merged 1 commit intozotero-plugin-dev:mainfrom
julkusapiens:fix/grey-to-gray-styletext

Conversation

@julkusapiens
Copy link
Copy Markdown
Contributor

@julkusapiens julkusapiens commented Mar 13, 2026

I discoverd this bug while working with zotero-plugin-template after having upgraded to Node v25.7.0.

npm start crashed with the following error:

> zotero-plugin serve
node:util:209
      validateOneOf(key, 'format', ObjectKeys(inspect.colors));
      ^
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'format' must be one of:  […] 'gray', […]. Received 'grey'
    at styleText (node:util:209:7)
    at Proxy.<anonymous> (file:///[…]/node_modules/zotero-plugin-scaffold/dist/shared/zotero-plugin-scaffold.qsx_2VJx.mjs:12:7)
    at file:///[…]/zotero-plugin-scaffold.qsx_2VJx.mjs:38:17
    at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
    at async node:internal/modules/esm/loader:639:26
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) {
  code: 'ERR_INVALID_ARG_VALUE'
}

The fix is obviously to use "gray" instead of "grey", so yeah :)
pnpm run build went smoothly obviously.

@julkusapiens julkusapiens changed the title fix: replace 'grey' with 'gray' in styleText call for Node.js compaibility fix: replace 'grey' with 'gray' in styleText call for Node.js compatibility Mar 13, 2026
@northword
Copy link
Copy Markdown
Member

It's a bug in Node.js,

But regardless, replacing this with gray won't be bad, thank you for your PR!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 14, 2026

npm i https://pkg.pr.new/zotero-plugin-scaffold@166

commit: cd191b2

@northword northword merged commit e362cb8 into zotero-plugin-dev:main Mar 14, 2026
5 checks passed
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.

2 participants