doorkeeper icon indicating copy to clipboard operation
doorkeeper copied to clipboard

Deprecation of NodeJS 12

Open Nosfistis opened this issue 2 years ago • 3 comments

There is a github action warning currently about the deprecation of nodejs 12:

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: patoroco/doorkeeper@master. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

Can we bump the node version to something more up to date, such as 18 LTS?

Nosfistis avatar May 09 '23 17:05 Nosfistis

Oh, thanks for highlighting that. Currently I'm out for some days, so I'll update it once I'll be in front of a computer, ok?

Thanks again!

patoroco avatar May 10 '23 03:05 patoroco

@Nosfistis I'm trying to update to node18, but I'm having troubles with some related dependencies. I don't have more time for today, so please take a look into https://github.com/patoroco/doorkeeper/pull/33/, and let me know if you're able to run a npm install of the project.

I'm getting the following errors:

Click for open
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @typescript-eslint/[email protected]
npm WARN Found: @typescript-eslint/[email protected]
npm WARN node_modules/@typescript-eslint/parser
npm WARN   dev @typescript-eslint/parser@"^4.33.0" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm WARN node_modules/@typescript-eslint/eslint-plugin
npm WARN   @typescript-eslint/eslint-plugin@"^5.1.0" from [email protected]
npm WARN   node_modules/eslint-plugin-github
npm WARN 
npm WARN Conflicting peer dependency: @typescript-eslint/[email protected]
npm WARN node_modules/@typescript-eslint/parser
npm WARN   peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm WARN   node_modules/@typescript-eslint/eslint-plugin
npm WARN     @typescript-eslint/eslint-plugin@"^5.1.0" from [email protected]
npm WARN     node_modules/eslint-plugin-github
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^7.32.0" from the root project
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     @typescript-eslint/eslint-plugin@"^5.1.0" from [email protected]
npm ERR!     node_modules/eslint-plugin-github
npm ERR!       dev eslint-plugin-github@"^4.3.5" from the root project
npm ERR!   14 more (@typescript-eslint/parser, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.0.1" from [email protected]
npm ERR! node_modules/eslint-plugin-github
npm ERR!   dev eslint-plugin-github@"^4.3.5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^8.0.1" from [email protected]
npm ERR!   node_modules/eslint-plugin-github
npm ERR!     dev eslint-plugin-github@"^4.3.5" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/patoroco/.npm/_logs/2023-06-25T22_01_12_992Z-eresolve-report.txt

Thanks!

patoroco avatar Jun 25 '23 22:06 patoroco

Hi @patoroco, the action fails.

Log

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ''using: node18' is not supported, use 'docker', 'node12' or 'node16' instead.') at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs) at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)

I think the errors you are seeing are related to the latest npm rules that require peer dependencies to match. Some older library versions might not support nodejs 18, or maybe they have not mentioned it in their package.json. Have you tried upgrading those libraries (e.g. eslint) to their latest version?

You can also skip it by using --legacy-peer-deps=true or --force as an npm argument, although I would not recommend that.

Nosfistis avatar Jun 29 '23 15:06 Nosfistis