Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT mode fails when no input CSS is provided #3979

Closed
sumanthratna opened this issue Apr 5, 2021 · 3 comments
Closed

JIT mode fails when no input CSS is provided #3979

sumanthratna opened this issue Apr 5, 2021 · 3 comments

Comments

@sumanthratna
Copy link

What version of Tailwind CSS are you using?

v2.1.0

What version of Node.js are you using?

v12.14.1

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction repository

https://github.com/sumanthratna/tailwind-2.1-noinput-repro

when I set mode: 'jit' and run yarn tailwindcss build, I get this error:

yarn run v1.22.10
$ /private/tmp/huh/node_modules/.bin/tailwindcss build

warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
  
   🚫 TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Url.parse (url.js:155:3)
    at Object.urlParse [as parse] (url.js:150:13)
    at trackModified (/private/tmp/huh/node_modules/tailwindcss/jit/lib/setupContext.js:230:24)
    at /private/tmp/huh/node_modules/tailwindcss/jit/lib/setupContext.js:726:38
    at /private/tmp/huh/node_modules/tailwindcss/jit/index.js:35:47
    at LazyResult.runOnRoot (/private/tmp/huh/node_modules/postcss/lib/lazy-result.js:303:16)
    at LazyResult.runAsync (/private/tmp/huh/node_modules/postcss/lib/lazy-result.js:355:26)
    at LazyResult.async (/private/tmp/huh/node_modules/postcss/lib/lazy-result.js:205:30)
    at LazyResult.then (/private/tmp/huh/node_modules/postcss/lib/lazy-result.js:190:17)
  
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What I'm expecting is the Tailwind build as if I provided the default Tailwind CSS file (this feature was introduced a while ago, so I think this is a regression)

I didn't see this error when using https://github.com/tailwindlabs/tailwindcss-jit

Also, the docs seem to suggest yarn postcss tailwindcss, but when I try that, I get this error (#3977):

Input Error: You must pass a valid list of files to parse
@sumanthratna
Copy link
Author

will be closed by #3978

@RobinMalfait
Copy link
Contributor

Hey! Thank you for your bug report!
Much appreciated! 🙏

Sorry about that! It should be fixed by #3978, can you try and updating to 2.1.1 and see if that works for you?

@sumanthratna
Copy link
Author

@RobinMalfait v2.1.1 works great! thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants