Create-react-app: 80% of deprecations in console are due to react-scripts

Created on 6 Aug 2020  路  13Comments  路  Source: facebook/create-react-app

Describe the bug

npm i [email protected]
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

deprecated

Environment

$ npx create-react-app --info
npx: 褍褋褌邪薪芯胁谢械薪 98 胁 18.49s

Environment Info:

current version of create-react-app: 3.4.1
running from C:\Users\User\AppData\Roamingnpm-cache_npx\17536\node_modules\create-react-app

System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
Binaries:
Node: 14.4.0 - C:\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.5 - C:\nodejsnpm.CMD
Browsers:
Edge: 44.18362.449.0
Internet Explorer: 11.0.18362.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: ^3.3.1 => 3.3.1
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

  1. run npm i [email protected]
    2.enjoy the deprecation messages
    npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
    npm WARN deprecated [email protected]: use String.prototype.padStart()
    npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
    npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

Expected behavior

No deprecation messages

Actual behavior

npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

bug report needs triage

Most helpful comment

To provide some tracking of each warning for myself and others:

  1. The request-promise-native and request warnings are coming from jsdom and the fix remains open: https://github.com/jsdom/jsdom/issues/2792
  2. har-validator warning is coming from request and will remain an issue until jsdom replaces it
  3. The @hapi/joi warnings are coming from workbox, which appears to be sticking with @hapi/joi to maintain support for node v10.x: https://github.com/GoogleChrome/workbox/issues/2609
  4. All other warnings starting with @hapi are dependencies of @hapi/joi and will therefore remain until workbox upgrades to joi
  5. One that may be in react-scripts control is the left-pad warning which was to be fixed in jest 25, which I believe was fixed in this pr: https://github.com/facebook/jest/pull/8850
  6. core-js warning coming from babel-runtime because of strip-comments (referenced here as well) but this issue/pr should remediate that warning

All 13 comments

this will be fixed in the next release. To test it out https://gist.github.com/iansu/282dbe3d722bd7231fa3224c0f403fa1

Hello! I have the same issue with deprecated dependencies and unfortunately switching to the new version did not correct the problem for me.

I changed my package.json reference "react-scripts": "next" and installed the new version.

I still received the following deprecation warnings:

npm WARN deprecated @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: this library is no longer supported

I ran npm ls <dependency-name@ver> on each of these dependencies and each traced back to react-scripts:

-- [email protected]
  `-- [email protected]
    `-- [email protected]
      `-- [email protected]
        `-- [email protected]
          `-- [email protected]
            `-- [email protected]`

`-- [email protected]
  `-- [email protected]
    `-- @jest/[email protected]
      `-- [email protected]
        `-- [email protected]
          `-- [email protected]
            `-- [email protected]`

`-- [email protected]
  `-- [email protected]
    `-- @jest/[email protected]
      `-- [email protected]
        `-- [email protected]
          `-- [email protected]
            `-- [email protected]`

`-- [email protected]
  `-- [email protected]
    `-- [email protected]
      `-- @hapi/[email protected]`

...

I'm sure I must be missing something on my end, I apologize for the trouble. Thanks so much!

Is there anything we can do to help? Having this many deprecation warnings scares me a bit to be honest.

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

Indeed, there's not much activity -- but the issue still persists.

Yeah, I'm seeing the same thing on 'next'

@gaearon any idea who currently "owns" this repo? It'd be good to get the deps updated and pushed as patch release, even if no code changes get pushed.

All of these would eventually resolve themselves as underlying packages are updated. I don't see an action item here. The messages showing up are unfortunate but there is no actual way it would impact your app or environment as far as I can tell.

While true, create-react-app is so ubiquitous that someone like you asking the folks who run the projects that create-react-app depends on to bump their versions to no longer yield deprecation errors would absolutely have a stronger effect than anyone else asking them to update ever could. Not having new users to react get a full screen of deprecation warnings when they follow the official "let's set up your first react application" steps sounds pretty worth it =)

I fully agree with you it's nice to have (and we actually worked with underlying packages in the past to get issues like this fixed) but I don't think this is a priority right now when there are bigger issues (such as to get 4.0 out).

To provide some tracking of each warning for myself and others:

  1. The request-promise-native and request warnings are coming from jsdom and the fix remains open: https://github.com/jsdom/jsdom/issues/2792
  2. har-validator warning is coming from request and will remain an issue until jsdom replaces it
  3. The @hapi/joi warnings are coming from workbox, which appears to be sticking with @hapi/joi to maintain support for node v10.x: https://github.com/GoogleChrome/workbox/issues/2609
  4. All other warnings starting with @hapi are dependencies of @hapi/joi and will therefore remain until workbox upgrades to joi
  5. One that may be in react-scripts control is the left-pad warning which was to be fixed in jest 25, which I believe was fixed in this pr: https://github.com/facebook/jest/pull/8850
  6. core-js warning coming from babel-runtime because of strip-comments (referenced here as well) but this issue/pr should remediate that warning

Thanks -- the tracking/explanations definitely help.

However, I fear having these deprecations produce warnings that are now "ok" will lead to some form of "warning fatique", and so one might end up ignoring _all_ of them because "probably that's just react-scripts anyways" (as unfair as that might sound, given above explanation that react-scripts isn't really the evil guy here).

I suspect there's not much that can be done here though, and the problem might be more in the way these deprecations get aggregated upwards by npm.

Maybe react-scripts could log something to point to a place that has these explanations?

Accuracy and elegance of React can be reduced to nothing with such littering tools like react-scripts. If perfectionists would leave React, where they would go?
Eject and Tree-shake on you!!! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wereHamster picture wereHamster  路  3Comments

Evan-GK picture Evan-GK  路  3Comments

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

rdamian3 picture rdamian3  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments