tailwindlabs / tailwindcss-jit

MIT License
2.19k stars 40 forks source link

JIT does not work #165

Closed chucamphong closed 3 years ago

chucamphong commented 3 years ago

What version of @tailwindcss/jit are you using?

v0.1.12

What version of Node.js are you using?

v15.11.0

What browser are you using?

Microsoft Edge

What operating system are you using?

Ubuntu 20.04

Reproduction repository

https://www.youtube.com/watch?v=3O_3X7InOw8&t=713s

App.css:

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

Log:

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
RangeError: Maximum call stack size exceeded
    at candidatePermutations (/var/www/html/node_modules/@tailwindcss/jit/src/lib/generateRules.js:19:32)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/var/www/html/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/var/www/html/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/var/www/html/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/var/www/html/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at processResult (/var/www/html/node_modules/webpack/lib/NormalModule.js:675:19)
    at /var/www/html/node_modules/webpack/lib/NormalModule.js:774:5
    at /var/www/html/node_modules/loader-runner/lib/LoaderRunner.js:399:11
    at /var/www/html/node_modules/loader-runner/lib/LoaderRunner.js:251:18
    at context.callback (/var/www/html/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
    at Object.loader (/var/www/html/node_modules/postcss-loader/dist/index.js:104:7)

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
munjalpatel commented 3 years ago

I am also facing the same exact issue with nuxt and tailwind

Error logs

 ERROR  Failed to compile with 1 errors                                                                                      friendly-errors 23:10:09

 ERROR  in ./assets/css/tailwind.css                                                                                         friendly-errors 23:10:09

Module build failed (from ./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js):                            friendly-errors 23:10:09
RangeError: Maximum call stack size exceeded
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:19:32)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/mpatel/workspace/k.com/web-dops-portal/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
                                                                                                                             friendly-errors 23:10:09
 @ ./assets/css/tailwind.css 4:14-221 15:3-20:5 16:22-229
 @ ./.nuxt/App.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fmodern&name=modern ./.nuxt/client.js

./assets/css/tailwind.css

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
fedeci commented 3 years ago

Seems to be similar to #166

kgnfth commented 3 years ago

same with nuxt tailwind

 ERROR  Failed to compile with 1 errors

 ERROR  in ./node_modules/@nuxtjs/tailwindcss/dist/runtime/tailwind.css

Module build failed (from ./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js):
RangeError: Maximum call stack size exceeded
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:19:32)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/home/deejavu/nuxtravolta/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)

 @ ./node_modules/@nuxtjs/tailwindcss/dist/runtime/tailwind.css 4:14-207 15:3-20:5 16:22-215
 @ ./.nuxt/App.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js

ℹ Waiting for file changes
ℹ Memory usage: 252 MB (RSS: 544 MB)
ℹ Listening on: http://localhost:3000/
fedeci commented 3 years ago

I am working on this btw.

kgnfth commented 3 years ago

I am working on this btw.

Thx it working.

adamwathan commented 3 years ago

Fixed in v01.13, sorry about that!