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

TypeError: x.trim is not a function

Open RomanKornev opened this issue 4 years ago • 3 comments
trafficstars

Support plan

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

Context

  • node version: v15.9.0
  • module version with issue: 3.4.0
  • last module version without issue: unknown
  • environment (e.g. node, browser, native): WSL2 Ubuntu
  • 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?

I'm trying to npm run watch

What was the result you got?

❯ npm run watch

[email protected] watch cra-build-watch

/home/df/work/ts_sandbox/node_modules/camelcase/index.js:35 .map(x => x.trim()) ^

TypeError: x.trim is not a function at /home/df/work/ts_sandbox/node_modules/camelcase/index.js:35:16 at Array.map () at module.exports (/home/df/work/ts_sandbox/node_modules/camelcase/index.js:35:5) at /home/df/work/ts_sandbox/node_modules/camelcase-keys/index.js:55:17 at mapObject (/home/df/work/ts_sandbox/node_modules/map-obj/index.js:34:28) at module.exports (/home/df/work/ts_sandbox/node_modules/map-obj/index.js:53:9) at camelCaseConvert (/home/df/work/ts_sandbox/node_modules/camelcase-keys/index.js:68:9) at module.exports (/home/df/work/ts_sandbox/node_modules/camelcase-keys/index.js:76:9) at meow (/home/df/work/ts_sandbox/node_modules/meow/index.js:180:16) at Object. (/home/df/work/ts_sandbox/node_modules/cra-build-watch/utils/cliHandler.js:5:18) npm ERR! code 1 npm ERR! path /home/df/work/ts_sandbox npm ERR! command failed npm ERR! command sh -c cra-build-watch

What result did you expect?

Successfull run

RomanKornev avatar Feb 21 '21 11:02 RomanKornev

Thanks @RomanKornev for raising this issue. I just released a new beta 4.0.0-beta.1 which is a complete rewrite. You can find more information here: https://github.com/Nargonath/cra-build-watch/releases/tag/v4.0.0-beta.1 and in the README: https://github.com/Nargonath/cra-build-watch/blob/beta/README.md#notes-for-version-v400-beta-testers. Would you mind giving it a shot to see if it fixes your issue?

Nargonath avatar Mar 23 '21 13:03 Nargonath

@Nargonath I will find time to test the beta later, but just a quick ask: Does it still handle build hooks?

bytrangle avatar Apr 26 '21 15:04 bytrangle

@bytrangle In this first draft, all the features were removed just to rely on webpackDevServer writeOnDisk feature and see how it goes. I'm not sure I'll be able to keep the build hooks if we go that route. I'd have to dig more through it.

Nargonath avatar Jun 24 '21 06:06 Nargonath

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