create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Update webpack-dev-server

Open ghost opened this issue 6 years ago • 10 comments

I am running into an issue in CRA TS which seems to be caused by an outdated webpack-dev-server dependency. The issue is nodejs/node#21665 and it used to occur in CRA too as it was also using an outdated version of the dependency and has since updated it. CRA TS is still using an affected version and the issue reproduces for me in CRA TS:

  1. create-react-app repro --scripts-version=react-scripts-ts
  2. cd repro
  3. Create a .env file and place HTTPS=true in it
  4. npm start
  5. Bypass the security warning in Chrome
  6. Keep refreshing until the issue occurs (~3 times)
internal/stream_base_commons.js:62
  var err = req.handle.writev(req, chunks, allBuffers);
                       ^

TypeError: req.handle.writev is not a function
    at writevGeneric (internal/stream_base_commons.js:62:24)
    at Socket._writeGeneric (net.js:711:5)
    at Socket._writev (net.js:720:8)
    at doWrite (_stream_writable.js:408:12)
    at clearBuffer (_stream_writable.js:517:5)
    at Socket.Writable.uncork (_stream_writable.js:314:7)
    at connectionCorkNT (_http_outgoing.js:641:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I believe the fix would be to update webpack-dev-server the same way. For me this happens on Windows but it should happen under the same conditions described in the linked issue for anyone.

ghost avatar Oct 30 '18 11:10 ghost

Upon further research it seems this issue may be reoccurring in CRA: facebook/create-react-app#5003.

ghost avatar Oct 30 '18 11:10 ghost

i'm having the same issue. I've installed recently node 10 and since then...

dnicoara-psft avatar Nov 02 '18 15:11 dnicoara-psft

I have switched to CRA 2.1 which added TypeScript support and came out a few days back, that may be an option for you as well, @dnicoara-psft. Migrating from create-react-app-typescript to Create React App

Just an FYI, obviously this issue still stands.

ghost avatar Nov 02 '18 15:11 ghost

@tomashubelbauermicrosoft How is your experience so far? I am facing a lot of linting related issues in CRA 2.1.

shobhitg avatar Nov 04 '18 10:11 shobhitg

I have not noticed anything of that sort yet, however it's been only a few days. Can you give me a few examples of what is subpar in the CRA version as opposed to the CRA-TS one in terms of linting?

ghost avatar Nov 05 '18 08:11 ghost

Another motivator for the bump: https://www.npmjs.com/advisories/725

Cyberboss avatar Nov 08 '18 19:11 Cyberboss

screen shot 2018-12-03 at 10 31 08 am

This is a high warning, needs fixing!!

kmturley avatar Dec 03 '18 15:12 kmturley

Alternatively, @wmonk please consider marking the repository as archived, if it is no longer maintained. If it isn't, that's absolutely fine, but it should be indicated so that people know not to use it for new stuff.

ghost avatar Dec 03 '18 15:12 ghost

Same problem here, any news for a fix?

MikaelStenstrand avatar Jan 03 '19 08:01 MikaelStenstrand

The project has been deprecated and was archived at some point (it seems to have been un-archived to update the readme and then not re-archived again). In any case, don't expect this package to be updated @MikaelStenstrand.

The transition to Create React App was relatively smooth in a project I'm working on, so I recommend making the transition to that project instead. The guide posted in an earlier comment was of great help. Good luck! 😄

wkillerud avatar Jan 03 '19 09:01 wkillerud