cra-build-watch icon indicating copy to clipboard operation
cra-build-watch copied to clipboard

Not compatible with react-scripts v5

Open jagannathBhat opened this issue 3 years ago • 6 comments
trafficstars

Support plan

  • is this issue currently blocking your project? (yes/no): yes
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: 16.5.0
  • module version with issue: 3.4.0
  • last module version without issue: unknown
  • environment (e.g. node, browser, native): macOS 12.1
  • used with (e.g. hapi application, another framework, standalone, ...): react
  • any other relevant information:

What are you trying to achieve or the steps to reproduce?

Add a script to package.json:

{
  "scripts": {
    "watch": "cra-build-watch"
  }
}

Run the command

yarn watch

What was the result you got?

Got the following error

 config.module.rules[oneOfIndex].oneOf[0].options.name = `media/[name].[hash:8].[ext]`;
                                                        ^
                                                        
TypeError: Cannot set property 'name' of undefined

What result did you expect?

No Error

jagannathBhat avatar Jan 21 '22 06:01 jagannathBhat

When can we have this one fixed? I have just upgraded react-scripts to v5 on our projects and now the watch is not working.

mscoobby avatar Feb 09 '22 13:02 mscoobby

same here, would like to use this but cannot because I am using v5

pateketu avatar Mar 08 '22 16:03 pateketu

My bandwidth is very limited right now so I don't have much time to dedicate to this project. I don't have any ETA for this.

Nargonath avatar Mar 08 '22 17:03 Nargonath

@mscoobby @pateketu Try this package for now. Published it from my fork.

jagannathBhat avatar Mar 09 '22 01:03 jagannathBhat

thanks @jagannathBhat this works great -:)

pateketu avatar Mar 09 '22 09:03 pateketu

@jagannathBhat Your fork loads webpack4, but cra5 uses webpack5, so there are validation errors for the configuration

phal0r avatar Apr 18 '22 13:04 phal0r

Sorry everybody but I don't have time to maintain this project anymore. I'll archive it so it's clear to everybody that they should fork it if they want to improve it.

Nargonath avatar Apr 24 '24 08:04 Nargonath