Mokshit06/typewind

typewind generate fails in a Yarn PnP workspace

dmaskasky opened this issue · 0 comments

$ npx typewind generate
Need to install the following packages:
  typewind@0.1.5
Ok to proceed? (y) y
node:internal/modules/cjs/loader:1093
  throw err;
  ^

Error: Cannot find module 'tailwindcss/resolveConfig.js'
Require stack:
- /Users/davidmaskasky/.npm/_npx/2afda5fafe38bc83/node_modules/typewind/dist/cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
    at Module._load (node:internal/modules/cjs/loader:934:27)
    at Module.require (node:internal/modules/cjs/loader:1157:19)
    at require (node:internal/modules/helpers:119:18)
    at Object.<anonymous> (/Users/davidmaskasky/.npm/_npx/2afda5fafe38bc83/node_modules/typewind/dist/cli.js:39:36)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/davidmaskasky/.npm/_npx/2afda5fafe38bc83/node_modules/typewind/dist/cli.js'
  ]
}

Node.js v19.9.0
churn-mitigation typewind $ yarn typewind generate 
/Users/davidmaskasky/Code/monorepo/.pnp.cjs:49909
      Error.captureStackTrace(firstError);
            ^

Error: typewind tried to access tailwindcss, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: tailwindcss (via "tailwindcss/resolveConfig.js")
Required by: typewind@npm:0.1.5 (via /Users/davidmaskasky/Code/monorepo/.yarn/cache/typewind-npm-0.1.5-ff13fbf7bd-d7bc2ef073.zip/node_modules/typewind/dist/)

Require stack:
- /Users/davidmaskasky/Code/monorepo/.yarn/cache/typewind-npm-0.1.5-ff13fbf7bd-d7bc2ef073.zip/node_modules/typewind/dist/cli.js
    at require$$0.Module._resolveFilename (/Users/davidmaskasky/Code/monorepo/.pnp.cjs:49909:13)
    at require$$0.Module._load (/Users/davidmaskasky/Code/monorepo/.pnp.cjs:49759:42)
    at Module.require (node:internal/modules/cjs/loader:1157:19)
    at require (node:internal/modules/helpers:119:18)
    at Object.<anonymous> (/Users/davidmaskasky/Code/monorepo/.yarn/cache/typewind-npm-0.1.5-ff13fbf7bd-d7bc2ef073.zip/node_modules/typewind/dist/cli.js:39:36)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at require$$0.Module._extensions..js (/Users/davidmaskasky/Code/monorepo/.pnp.cjs:49953:33)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at require$$0.Module._load (/Users/davidmaskasky/Code/monorepo/.pnp.cjs:49772:22)

Node.js v19.9.0```