histoire
histoire copied to clipboard
Tailwind CSS automatic design tokens not working when run in pnpm
Describe the bug
Tailwind CSS auto design tokens work fine when run in npm or yarn, but not in pnpm.
Error Details
$ pnpm story:dev
> [email protected] story:dev /workspace/repro-crach-use-pnpm-histoire
> histoire dev
➜ Local: http://127.0.0.1:6006/
➜ Network: use --host to expose
Collect stories start all
Error while collecting story /workspace/repro-crach-use-pnpm-histoire/node_modules/.histoire/plugins/builtin_tailwind-tokens/Tailwind.story.js:
Error: [vite-node] Failed to load @histoire/controls
at ViteNodeRunner.directRequest (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:165:13)
at async ViteNodeRunner.cachedRequest (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:113:12)
at async request (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:136:16)
at async histoire/dist/node/vendors/controls.js:1:238
at async ViteNodeRunner.directRequest (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:217:5)
at async ViteNodeRunner.cachedRequest (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:113:12)
at async request (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:136:16)
at async /workspace/repro-crach-use-pnpm-histoire/node_modules/.histoire/plugins/builtin_tailwind-tokens/Tailwind.story.js:7:31
at async ViteNodeRunner.directRequest (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:217:5)
at async ViteNodeRunner.cachedRequest (file:///workspace/repro-crach-use-pnpm-histoire/node_modules/.pnpm/[email protected]/node_modules/vite-node/dist/client.mjs:113:12)
Collect stories end 1335 ms
Reproduction
https://github.com/oekazuma/repro-crach-use-pnpm-histoire
System Info
System:
OS: macOS 12.5.1
CPU: (8) arm64 Apple M1
Memory: 92.91 MB / 16.00 GB
Shell: 5.8.1 - /bin/zshx
Binaries:
Node: 16.15.0 - ~/Library/pnpm/node
Yarn: 1.22.18 - ~/Library/pnpm/yarn
npm: 8.5.5 - ~/Library/pnpm/npm
Browsers:
Chrome: 105.0.5195.102
Firefox: 103.0.1
Safari: 15.6.1
npmPackages:
@histoire/plugin-svelte: ^0.10.7 => 0.10.7
histoire: ^0.10.7 => 0.10.7
vite: ^3.1.0 => 3.1.0
Used Package Manager
pnpm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- [X] The provided reproduction is a minimal reproducible example of the bug.