react-lottie icon indicating copy to clipboard operation
react-lottie copied to clipboard

NPM version requires ^3.0.0

Open maniax89 opened this issue 5 years ago • 19 comments

Description

This library requires the carat (^) of npm for 3.0.0 -> ^3.0.0

this causes issues for any packages consuming this library that require newer versions of npm because the ^ indicates that the left-most (major) version cannot be increased.

is there any reason we can't remove this restriction? or do newer versions of npm break this library?

maniax89 avatar Aug 12 '19 18:08 maniax89

details on the caret operator -> https://docs.npmjs.com/misc/semver#caret-ranges-123-025-004

maniax89 avatar Aug 12 '19 18:08 maniax89

have the same question, too.

rzfang avatar Sep 10 '19 17:09 rzfang

you can downgrade your node version to a version that uses npm 3.X.X and after installing return to your original node version.

SKOLZ avatar Sep 12 '19 23:09 SKOLZ

@SKOLZ On my dev, sure, I can do that. But some CI/CD process are untouchable.

rzfang avatar Sep 14 '19 08:09 rzfang

haha yes @rzfang I don't know how to make it work with a CI/CD without creating a PR to this lib to remove this kind of dependency. I used it and had to do that manually while developing and although I know it's a really horrible way to bypass the issue that's what worked for me. sorry for not being helpful enough :(

SKOLZ avatar Sep 16 '19 14:09 SKOLZ

thanks @mcallegari10

SKOLZ avatar Sep 16 '19 16:09 SKOLZ

@SKOLZ no worry. You gave a useful information. Thanks. And thanks @mcallegari10, too.

rzfang avatar Sep 16 '19 16:09 rzfang

Issue still persist even after 2 years.

Unsupported engine for [email protected]: wanted: {"npm":"^3.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})

AlauddinTheWonder avatar Apr 26 '21 06:04 AlauddinTheWonder

Same here!

stoefln avatar Jun 22 '21 14:06 stoefln

same problem here: npm WARN notsup Unsupported engine for [email protected]: wanted: {"npm":"^3.0.0"} (current: {"node":"14.15.2","npm":"6.14.9"}) npm WARN notsup Not compatible with your version of node/npm: [email protected]

Mandres07 avatar Jun 30 '21 17:06 Mandres07

hi pro, i have a same problem. do you have any idea to solve it, please?

truongtho-dev avatar Aug 30 '21 01:08 truongtho-dev

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { npm: '^3.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.9.1', npm: '7.24.0' }
npm WARN EBADENGINE }

The same error

horberlan avatar Sep 21 '21 17:09 horberlan

How about using react-lottie-player?

piro0919 avatar Dec 16 '21 16:12 piro0919

I had this issue when deploying to heroku, so using this in my package.json worked and making sure u ran in the version below did the magic!


  "engines": {
    "npm": "6.x",
    "node": "14.x"
  }

walosha1 avatar Feb 01 '22 22:02 walosha1

this error shows up every time i install a package

 Unsupported engine {
     package: '[email protected]',
     required: { npm: '^3.0.0' },
     current: { node: 'v16.13.0', npm: '8.1.0' }
 }

mojirzg avatar Sep 05 '22 05:09 mojirzg

@chenqingspring Update this or deprecate the package.

sagarpanchal avatar Jan 19 '23 06:01 sagarpanchal

Almost 4 years and this is still not updated. I managed to fix but I also had to change the peerDependencies. And then I was able to deploy it.

"node_modules/react-lottie": {
  "version": "1.2.3",
  "resolved": "https://registry.npmjs.org/react-lottie/-/react-lottie-1.2.3.tgz",
  "integrity": "sha512-qLCERxUr8M+4mm1LU0Ruxw5Y5Fn/OmYkGfnA+JDM/dZb3oKwVAJCjwnjkj9TMHtzR2U6sMEUD3ZZ1RaHagM7kA==",
  "dependencies": {
    "babel-runtime": "^6.26.0",
    "lottie-web": "^5.1.3"
  },
  "engines": {
    "npm": "6.x",
    "node": "14.x"
  },
  "peerDependencies": {
    "react": "*"
  }
},

yamgarcia avatar Feb 12 '23 00:02 yamgarcia

To everyone who is complaining about the npm version issue, Copy the src/index.js file and uninstall this package. Thanks.

sagarpanchal avatar Apr 16 '23 13:04 sagarpanchal

For everyone still asking, I replaced it with lottie-react and it works fine. Also passed the pipeline. Here is the link: https://www.npmjs.com/package/lottie-react

EnriRane avatar Aug 08 '23 14:08 EnriRane