Create-react-app: when pulling 'npm install [email protected]' the file 'webpackHotDevClient.js' is not the latest one

Created on 25 Dec 2019  路  7Comments  路  Source: facebook/create-react-app

Describe the bug

when pulling 'npm install [email protected]' the file 'webpackHotDevClient.js' is not the latest one.
The file should include the corrected line #62:
protocol: window.location.protocol === 'https:' ? 'wss' : 'ws'
but it includes:
protocole: 'ws'

this break the option to use https in development mode.

Did you try recovering your dependencies?

yes. Tried to rebuild the application from scratch using 'create-react-app', but still getting the same result.
I basically followed the instructions on bug #8075, #8079

Which terms did you search for in User Guide?

https, websocket, error

Environment

Environment Info:

  System:
    OS: Linux 4.19 Alpine Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: 12.2.0 - /usr/local/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^16.12.0 => 16.12.0 
    react-dom: ^16.12.0 => 16.12.0 
    react-scripts: 3.3.0 => 3.3.0 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. npx create-react-app .
  2. ls -la node_modules/react-dev-utils
    3.

Expected behavior

The file should be updated as of 12/8/19 and it is showing 12/7/19

Actual behavior

Reproducible demo

Most helpful comment

hey @heyimalex, hope you had a nice Xmas and New Year. Sorry to be asking the same questions here, but any idea on timings of release for this? We are also waiting to implement a security fix that is dependent upon this.

All 7 comments

3.3.1 hasn't been released yet. So it's merged, but not released.

@heyimalex Sorry if it's off-topic. Is there a specific date for the 3.3.1 release? We're waiting for a security fix :)

Sorry, I think everyone has been kinda busy for the holidays! The milestone is here, but we could move some of those to 3.3.2.

Sorry, I think everyone has been kinda busy for the holidays!

Should have guessed 馃槄 Thanks and Happy holidays!

hey @heyimalex, hope you had a nice Xmas and New Year. Sorry to be asking the same questions here, but any idea on timings of release for this? We are also waiting to implement a security fix that is dependent upon this.

As a temp workaround you can patch react-dev-utils with patch-package (thanks to @cheezekurl for idea):

  1. Make your code changes to node_modules/react-dev-utils/webpackHotDevClient.js manually
  2. Save changes as a .patch file, by running in the project root:
npx patch-package react-dev-utils
  1. To apply patches automatically add to package.json:
"scripts": {
+  "postinstall": "patch-package"
}
  1. Add patch-package as a dev dependency to the project:
npm i patch-package --save-dev

or

yarn add patch-package postinstall-postinstall --dev
  1. Don't forget to commit fix:
new file:   patches/react-dev-utils+10.0.0.patch
modified:   package.json

鈽濓笍 In case of error Agreeing to the Xcode/iOS license requires admin privileges.. on MacOS, run command:

sudo xcodebuild -license accept

Releasing in the next couple hours.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ap13p picture ap13p  路  3Comments

alleroux picture alleroux  路  3Comments

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

rdamian3 picture rdamian3  路  3Comments

barcher picture barcher  路  3Comments