caz icon indicating copy to clipboard operation
caz copied to clipboard

Bug: running caz removes local `node_modules/.bin/caz` entry

Open Nokel81 opened this issue 2 years ago • 5 comments

Prerequisites:

  1. Have caz as a top level devDependency in my workspaces based monorepo
  2. Have a local template that I want to use
  3. run npm exec -- caz .templates/my-template packages/my-new-package
  4. See the weird and slow "Installing template dependencies..." text
  5. Get the first prompt
  6. Cancel
  7. Try step 3 again, failure

Expected behaviour:

  1. It shouldn't install anything
  2. It shouldn't remove any existing dependencies

Nokel81 avatar Nov 09 '23 19:11 Nokel81

I need to confirm the issue you mentioned first.

Can you provide a replicated repo. @Nokel81

zce avatar Dec 18 '23 01:12 zce

这是自动回信息!       您好!首先感谢你的来信!如果不出意外最短在一个月内会得到我的回复,如果没有我的回复,说明我还需要更多的时间!

findersky avatar Dec 18 '23 01:12 findersky

You can add a package.json to the template directory to prevent this issue from occurring. I will correct this issue later

zce avatar Dec 18 '23 01:12 zce

I ran into the same issue. In my case the jsdoc package, which is a dev dependency, was removed. After running npm i, all my dependencies are restored. But how is this possible? Does caz somehow manipulate the node_modules folder?

MartinLoeper avatar Apr 29 '24 15:04 MartinLoeper

这是自动回信息!       您好!首先感谢你的来信!如果不出意外最短在一个月内会得到我的回复,如果没有我的回复,说明我还需要更多的时间!

findersky avatar Apr 29 '24 15:04 findersky