postcss / postcss-cli

CLI for postcss
Other
840 stars 93 forks source link

postcss-cli does not terminate even without --watch #375

Closed nileshtrivedi closed 3 years ago

nileshtrivedi commented 3 years ago

I am running postcss without the --watch option, and it does generate the output file, but the process does not terminate:

$ ./node_modules/.bin/postcss my.css -o twinkle.min.css --verbose
Processing my.css...
Finished my.css in 2.48 s

It keeps waiting here, seemingly forever. I can't figure out if it's watching a folder or expecting input from STDIN. As you can see, the --verbose option is not providing a lot of information.

$ node -v
v14.15.0
$ npm -v
7.11.1
$ cat postcss.config.js 
module.exports = {
  plugins: {
    '@tailwindcss/jit': {},
    autoprefixer: {},
    cssnano: {}
  }
}

Here is the dependencies section from my package.json:

    "devDependencies": {
        "@tailwindcss/aspect-ratio": "^0.2.0",
        "@tailwindcss/forms": "^0.3.2",
        "@tailwindcss/jit": "^0.1.18",
        "@tailwindcss/line-clamp": "^0.2.0",
        "@tailwindcss/typography": "^0.4.0",
        "autoprefixer": "^10.2.5",
        "cssnano": "^5.0.1",
        "postcss": "^8.2.12",
        "postcss-cli": "^8.3.1",
        "postcss-nested": "^5.0.5",
        "tailwindcss": "^2.1.2",
        "watch": "^1.0.2"
    }

I'm using Mac OS 10.15.6

nileshtrivedi commented 3 years ago

Sorry, my bad. This behavior is coming from @tailwindcss/jit. Using NODE_ENV=production is advised for one-off builds.