turbo: [turbopack] [tailwind] warnings and slow build time with tailwind

What version of Turbopack are you using?

alpha

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Windows

Describe the Bug

Hello. I’m trying to use Turbopack with Tailwind. I execute next dev --turbo --show-all, and after i open localhost:3000 on my browser im getting those errors:

warning - [parse]
  node_modules\postcss\lib\input.js
    node_modules\postcss\lib\input.js:44:20  lint TP1006 path.resolve(???*0*) is very dynamic
        40 |         isAbsolute(opts.from)
        41 |       ) {
        42 |         this.file = opts.from
        43 |       } else {
           |                     v
        44 +         this.file = resolve(opts.from)
           |                     ^
        45 |       }
        46 |     }
        47 | 
        48 |     if (pathAvailable && sourceMapAvailable) {
    
    - *0* ???*1*["from"]
      ⚠️  unknown object
    - *1* opts
      ⚠️  pattern without value

  node_modules\postcss\lib\previous-map.js
    node_modules\postcss\lib\previous-map.js:88:8  lint TP1004 fs.existsSync(???*0*) is very dynamic
        84 |   }
        85 | 
        86 |   loadFile(path) {
        87 |     this.root = dirname(path)
           |         v
        88 +     if (existsSync(path)) {
           |         ^
        89 |       this.mapFile = path
        90 |       return readFileSync(path, 'utf-8').toString().trim()
        91 |     }
        92 |   }
    
    - *0* arguments[0]
      ⚠️  function calls are not analysed yet

    node_modules\postcss\lib\previous-map.js:90:13  lint TP1004 fs.readFileSync(???*0*, "utf-8") is very dynamic
        86 |   loadFile(path) {
        87 |     this.root = dirname(path)
        88 |     if (existsSync(path)) {
        89 |       this.mapFile = path
           |              v
        90 +       return readFileSync(path, 'utf-8').toString().trim()
           |              ^
        91 |     }
        92 |   }
        93 |
        94 |   loadMap(file, prev) {
    
    - *0* arguments[0]
      ⚠️  function calls are not analysed yet

Couldn’t find anything about it.

Im new to those techs, and i’m sorry if i’ve just done something wrong

Expected Behavior

Expected fast build and no warnings.

To Reproduce

I just followed instructions on https://tailwindcss.com/docs/guides/nextjs

Reproduction Repo

https://github.com/Soraka-TheBanshee/imdb-clone

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 23
  • Comments: 21 (2 by maintainers)

Most upvoted comments

I’d really like to not downgrade, as I am using the new routing feature under Next 13.2 Is there a way to disable the warning to not show in the browser?

This seems to be an issue with Next@13.2…Downgrading to Next@13.1.6 fixed this issue for me.

This issue is related to linters of turborepo. add this texts in file named postcss.config.js /* eslint-disable */ at start of file and /* eslint-enable */ at the end of file.

my file looked like this

/* eslint-disable */
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
};
/* eslint-enable */

hi

did you solve the problem ?

im getting this error :

Turbopack compiled with warnings
1 of 4 
lint TP1004 fs.readFileSync(???*0*, "utf-8") is very dynamic
warning - [parse] [project]/node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/previous-map.js  /node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/previous-map.js:90:13  lint TP1004 fs.readFileSync(???*0*, "utf-8") is very dynamic
      86 |   loadFile(path) {
      87 |     this.root = dirname(path)
      88 |     if (existsSync(path)) {
      89 |       this.mapFile = path
         |              v
      90 +       return readFileSync(path, 'utf-8').toString().trim()
         |              ^
      91 |     }
      92 |   }
      93 | 
      94 |   loadMap(file, prev) {
  
  - *0* arguments[0]
    ⚠️  function calls are not analysed yet

yeah i got the same issue and it’s resolved by updating the postcss.config.js as per https://github.com/vercel/turbo/issues/3972#issuecomment-1499396061

Downgrading to next 13.1.6 worked for me.

Still an issue

next - 13.4.3 react - 18.2.0

Issue 1 - local env doesn't work image
Issue 2 - wierd readFileSync warnings image

Switching to next 13.1.6 didn’t help to resolve any of this issues Instead, removing --turbo from scripts-dev helped to solve both issues for me (next - 13.4.3) 🫡 😞