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

Not working with [email protected]

Open Haaxor1689 opened this issue 4 years ago • 2 comments

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: 15.2.1
  • module version with issue: 3.4.0
  • last module version without issue: -
  • environment (e.g. node, browser, native): browser
  • used with (e.g. hapi application, another framework, standalone, ...): -
  • any other relevant information: [email protected]

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

The cra-build-watch ends with error if I'm using [email protected] which I need to use because of emotion and new jsx pragma system in react 17.

What was the result you got?

The error:

yarn run v1.22.5
$ cra-build-watch

- Update webpack configurationC:\Projects\_InQool\jch2\web\node_modules\cra-build-watch\scripts\index.js:98
  config.module.rules[oneOfIndex].oneOf[0].options.name = `media/[name].[hash:8].[ext]`;
                                       ^

TypeError: Cannot read property '0' of undefined
    at Object.<anonymous> (C:\Projects\_InQool\jch2\web\node_modules\cra-build-watch\scripts\index.js:98:40)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47

What result did you expect?

No error.

Haaxor1689 avatar Nov 27 '20 10:11 Haaxor1689

+1

CRA v4 is not working with this tool.

MatissJanis avatar Dec 29 '21 20:12 MatissJanis

Same/Similar issue with react script 5

cra-build-watch -v

  • Update webpack configuration{PATH}\ClientApp\node_modules\cra-build-watch\scripts\index.js:98 config.module.rules[oneOfIndex].oneOf[0].options.name = media/[name].[hash:8].[ext]; ^

TypeError: Cannot set properties of undefined (setting 'name') at Object. ({PATH}\ClientApp\node_modules\cra-build-watch\scripts\index.js:98:57) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47

norcino avatar Jan 13 '22 15:01 norcino

Sorry I don't have time to maintain this project anymore so I'll archive it and add a note in the README. Feel free to fork it as you see fit.

Nargonath avatar Apr 24 '24 08:04 Nargonath