Skip to content

[Bug?]: Tailwind Setup Breaking Generators on Windows #6194

@BBurnworth

Description

@BBurnworth

What's not working?

Adding tailwind with yarn rw setup ui tailwind breaks any yarn rw g command with this error:

Cannot create property 'context' on string 'Error: Cannot find module '~\Code\testTail\webconfig ailwind.config.js'

Other cli commands still work.

Looking at the error, the forward slashes are gone from web\config\ and the 't' is gone and replaced by a space (or tab). Perhaps it is a escape character issue - '\t' is escaped as a tab.

Error output at terminal:

$ yarn rw g component Test
Cannot create property 'context' on string 'Error: Cannot find module '~\Code\testTail\webconfig    ailwind.config.js'
Require stack:
- ~\Code\testTail\node_modules\prettier\noop.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at i (~\Code\testTail\node_modules\prettier-plugin-tailwindcss\dist\index.js:134:1582)
    at Yb (~\Code\testTail\node_modules\prettier-plugin-tailwindcss\dist\index.js:134:1694)
    at Td.exports (~\Code\testTail\node_modules\prettier-plugin-tailwindcss\dist\index.js:134:1717)
    at nx.exports (~\Code\testTail\node_modules\prettier-plugin-tailwindcss\dist\index.js:134:2426)
    at Object.parse (~\Code\testTail\node_modules\prettier-plugin-tailwindcss\dist\index.js:146:4138)
    at Object.parse (~\Code\testTail\node_modules\prettier\index.js:7334:23)
    at coreFormat (~\Code\testTail\node_modules\prettier\index.js:8645:18)
    at formatWithCursor2 (~\Code\testTail\node_modules\prettier\index.js:8837:18)
    at ~\Code\testTail\node_modules\prettier\index.js:37229:12'

How do we reproduce the bug?

  1. Create new redwood app
  2. run yarn rw setup ui tailwind
  3. run yarn rw g component test

What's your environment? (If it applies)

System:
    OS: Windows 10 10.0.19044
  Binaries:
    Node: 16.15.1 - C:\Users\BBURNW~1\AppData\Local\Temp\xfs-6fc7c87e\node.CMD
    Yarn: 3.2.1 - C:\Users\BBURNW~1\AppData\Local\Temp\xfs-6fc7c87e\yarn.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.47)
  npmPackages:
    @redwoodjs/core: 2.2.0 => 2.2.0

Are you interested in working on this?

  • I'm interested in working on this

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions