digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
68 stars 34 forks source link

CLI fails on version 0.1.0-alpha.12 with "designsystemet: command not found" #2163

Open unekinn opened 6 days ago

unekinn commented 6 days ago

Description of the bug

When trying to run the CLI command, it fails. This started happening with 0.1.0-alpha.12. It seems to be a different bug than the one described in https://github.com/digdir/designsystemet/issues/2133.

Steps To Reproduce

  1. Run npx @digdir/designsystemet@0.1.0-alpha.12
  2. See error designsystemet: command not found
  3. Run npx @digdir/designsystemet@0.1.0-alpha.11
  4. See expected output

The problem also happens when @digdir/designsystemet is a dependency in package.json and run through e.g. a script

    "build": "npm run clean && designsystemet tokens -o ./dist",

Additional Information

In case it's relevant: OS is macOS 14.5 npm version 10.8.1 node version 20.12.1

mimarz commented 5 days ago

Jepp!

It broke after we changed transpiler to better support using the package in code (in addition to the cli).

We changed to use tsup and it seemingly worked before, but not now 🤔

mimarz commented 5 days ago

Should be working albeit with a warning as I had to add assert { type:'json' } to the package.json import in the init script.