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

templates that have a failing engines key in package.json, and version is pre-release, cannot be installed (using latest dist-tag) #694

Open
shazron opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@shazron
Copy link
Member

shazron commented Nov 21, 2024

Template: https://github.com/adobe/commerce-events-ext-tpl

Repro Steps

  1. Use [email protected] or greater and [email protected] or greater
  2. Install the template above using the aio-cli (via aio app init) or npm i

Error:

npm error code ETARGET
npm error notarget No matching version found for @adobe/commerce-events-ext-tpl@*.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.

Expected Behavior

The template/module can be installed.

Actual Behavior

The template/module cannot be installed and results in an error.

Investigation

[email protected] or greater has different behavior due to a bug fix. Users may have been relying on buggy behavior which has been fixed now.

The template above has an engines key of ^14 and is a pre-release version 1.0.0-beta.9 which results in the error.

Installing the module using a specific version, will not result in the error, there is an error only if it's using the latest dist-tag.

If I tested npm i of a module that fails the engine check on node-22 and is not a pre-release, it does not result in an error. Example module.

Fix

Remove the "engines" key from the template's package.json or update the engines key to a version that will pass on nodes >= 20, and/or update the version to a non-pre-release version.

Supporting Info

  1. https://docs.npmjs.com/cli/v10/using-npm/changelog#1082-2024-07-09
  2. https://github.com/npm/npm-pick-manifest/releases/tag/v9.1.0
  3. npm/npm-pick-manifest@9f5560f
  4. Add note about using EOL release versions nodejs/nodejs.org#6913
  5. node version to npm version mappings: https://nodejs.org/dist/index.json
@shazron shazron changed the title templates that have a failing engines key in package.json cannot be installed (using latest dist-tag) templates that have a failing engines key in package.json, and version is pre-release, cannot be installed (using latest dist-tag) Nov 21, 2024
@shazron shazron added the bug Something isn't working label Nov 21, 2024
@aiojbot
Copy link

aiojbot commented Nov 21, 2024

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants