question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tailwind generator fails on Windows 10

See original GitHub issue

With a new installation of Redwood 0.19.1 yarn rw g util tailwind fails to execute on Windows 10 using PowerShell. Also tested with same result using Git Bash.

Output

PS C:\Users\nerdstep\webdev\shipu> yarn rw g util tailwind
yarn run v1.22.5
$ C:\Users\nerdstep\webdev\shipu\node_modules\.bin\rw g util tailwind
rw g util <util>

Quality of life utilities

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Also see the Redwood CLI Reference
(​https://redwoodjs.com/reference/command-line-interface​)

Not enough non-option arguments: got 0, need at least 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

System info

System:
    OS: Windows 10 10.0.19041
  Binaries:
    Node: 12.18.4 - ~\AppData\Local\Temp\yarn--1601065079101-0.9007915850264594\node.CMD
    Yarn: 1.22.5 - ~\AppData\Local\Temp\yarn--1601065079101-0.9007915850264594\yarn.CMD 
  Browsers:
    Edge: Spartan (44.19041.423.0), Chromium (85.0.564.63)
  npmPackages:
    @redwoodjs/core: ^0.19.1 => 0.19.1 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
thedavidpricecommented, Oct 5, 2020

So, apparently, Setup hasn’t been, ahem, setup?

This helps. Will dig deeper a bit later

1reaction
Tobbecommented, Oct 5, 2020

As we saw in a previous comment of mine, installing 0.19.2-canary.40 doesn’t give me the setup command at all. Doing a build locally and copying that over (yarn rwt copy) does give me setup.

But running yarn rw setup tailwind fails with a message of a missing file, and I couldn’t figure out why. I run yarn rwt copy and the file is there. I run yarn rw setup tailwind and the file is not there 🤔

I finally figured out the file disappears because yarn rw setup tailwind does yarn workspace web add ... and that overwrites (removes) the stuff that yarn rwt copy copied to the node_modules folder. le sigh

So. This works:

$ yarn rwt copy
$ yarn workspace web add -D postcss-loader@4.0.2 tailwindcss autoprefixer@9.8.6
$ cp -r ../redwood/packages/cli/dist/commands/setu* node_modules/\@redwoodjs/cli/dist/commands/
$ vim node_modules/\@redwoodjs/cli/dist/commands/setup/tailwind/tailwind.js
      //await (0, _execa.default)('yarn', ['workspace', 'web', 'add', '-D', 'postcss-loader@4.0.2', 'tailwindcss', 'autoprefixer@9.8.6']);
$ yarn rw setup tailwind
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tailwindcss 3 does not init on Windows 10 - Stack Overflow
At work, I use Windows 10 and it just does not work at all. I am crazy to start a new project with...
Read more >
My Dashboard Isn't Working Correctly
If something on your Tailwind dashboard is not working, check out the potential solutions below to help get it resolved!
Read more >
How to: Add TailwindCSS to RedwoodJS
Hi folks - I am loving Redwood and wanted to pair it with the productivity of TailwindCSS. I wrote my findings on how...
Read more >
Using Tailwind CSS with Rails - Honeybadger Developer Blog
Tailwind CSS is a popular CSS framework that helps developers quickly build and style web pages with a unique utility-based approach.
Read more >
An Eleventy Starter with Tailwind CSS and Alpine.js
Hm, I don't understand why this setup doesn't work on Windows. Probably some issue with server sync, or ./ in the paths but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found