codechips / sapper-with-postcss-and-tailwind

Basic Sapper app with PostCSS + Tailwind
https://sapper-with-postcss-and-tailwind.vercel.app
22 stars 6 forks source link

Dependences issue, PostCSS 8 missing #2

Closed quantuminformation closed 4 years ago

quantuminformation commented 4 years ago

I followed instructions and ended up with the following versus what do you have

image

I get this error when running:

Error: PostCSS plugin postcss-import requires PostCSS 8. Migration guide for end-users: https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users at Processor.normalize (/Users/nikos/WebstormProjects/quantumjs/node_modules/postcss/lib/processor.js:153:15) at new Processor (/Users/nikos/WebstormProjects/quantumjs/node_modules/postcss/lib/processor.js:56:25) at postcss (/Users/nikos/WebstormProjects/quantumjs/node_modules/postcss/lib/postcss.js:55:10) at /Users/nikos/WebstormProjects/quantumjs/node_modules/postcss-cli/index.js:218:14 at async Promise.all (index 0)

codechips commented 4 years ago

PostCSS was updated to version 8 not that long ago and some PostCSS plugins are lagging behind in their upgrades, causing trouble. Removed postcss-import plugin. Seems to fix the issue.

quantuminformation commented 4 years ago

cool thx

pascalandy commented 3 years ago

I had to mess around this as well. Here is my package.json now:


"scripts": {
  ...
  },
  "dependencies": {
    "autoprefixer": "^10.2.0",
    "compression": "^1.7.4",
    "express": "^4.17.1",
    "polka": "^0.5.2",
    "sirv": "^1.0.7",
    "tailwindcss": "^2.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.3",
    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
    "@babel/plugin-transform-runtime": "^7.12.1",
    "@babel/preset-env": "^7.12.1",
    "@babel/runtime": "^7.12.1",
    "@rollup/plugin-babel": "^5.2.1",
    "@rollup/plugin-commonjs": "^16.0.0",
    "@rollup/plugin-node-resolve": "^10.0.0",
    "@rollup/plugin-replace": "^2.3.4",
    "@tailwindcss/typography": "^0.2.0",
    "cssnano": "^4.1.10",
    "npm-run-all": "^4.1.5",
    "postcss": "^8.2.2",
    "postcss-cli": "^8.2.0",
    "postcss-load-config": "^3.0.0",
    "postcss-preset-env": "^6.7.0",
    "prettier": "^2.1.2",
    "prettier-plugin-svelte": "^1.4.1",
    "rollup": "^2.33.1",
    "rollup-plugin-svelte": "^6.1.0",
    "rollup-plugin-terser": "^7.0.2",
    "sapper": "^0.28.10",
    "svelte": "^3.29.4",
    "svelte-preprocess": "^4.5.2"
  }
}