ember-cli-storybook icon indicating copy to clipboard operation
ember-cli-storybook copied to clipboard

[Bug] npm install breaks with npm version 8

Open tschoartschi opened this issue 2 years ago • 6 comments

Describe the bug

When trying to install @storybook/ember-cli-storybook with npm in version 8.11.0 it always gives me the following error:

npm ERR! Invalid Version: 3.5.0pr2

The error comes from the npm package yui which is dragged in by ember-cli-addon-docs-yuidoc. The root cause of this issue has to do with a problem of npm itself, for more details see here: https://github.com/npm/cli/issues/5017

When we run npm i with the --no-audit flag everything runs just fine but this also feels a little bit weird

I wonder if it's possible to use something else than ember-cli-addon-docs-yuidoc because I think that yuidoc is already a very old project (last published 6 years ago).

Just let me know what you think and feel free to just close the ticket if it's not relevant or not an option to switch away from ember-cli-addon-docs-yuidoc.

Steps to reproduce the behavior

If you have volta installed, skip step 1 and 2

  1. Install node version 16.15.1 // I think every 16.x is fine
  2. Install npm version 8.11.0 // I think every 8.x is fine
  3. check out the repo: https://github.com/tschoartschi/storybook-ember-cli-storybook-problems
  4. try to npm i without --no-audit flag
  5. now you should see the error: npm ERR! Invalid Version: 3.5.0pr2

Expected behavior

npm i also works without --no-audit

Environment

  • OS: MacOS BigSur 11.4
  • Node.js version: 16.15.1
  • NPM version: 8.11.0
  • Device: Mac Book Pro 15-inch 2017

tschoartschi avatar Jun 17 '22 10:06 tschoartschi

Hi, I opened #125 in an attempt to workaround this. Hope this helps.

nlepage avatar Jun 23 '22 14:06 nlepage

@nlepage thanks for your work! This still fails in the Github jobs because of the npm version. I'm going to check if I can update the npm version to the last one.

Gorzas avatar Jul 05 '22 10:07 Gorzas

AFAIK, we can't use the last npm version in Github jobs (or it's very hacky). I see this PR was closed but not merged. Maybe could we merge it so last changes could work?

Gorzas avatar Jul 12 '22 11:07 Gorzas

PR has been merged but the CI jobs are still failing, it wasn't enough 😔. I'm going to take a look in case I can find a workaround for YUI version problem.

Gorzas avatar Aug 11 '22 09:08 Gorzas

@Gorzas Sorry for the delay, I pushed a PR to fix the CI jobs.

nlepage avatar Aug 23 '22 08:08 nlepage

@nlepage no worries 😊. The last version of NodeJS was published just a week ago. Thanks a lot!

Gorzas avatar Aug 23 '22 10:08 Gorzas