Tailwind install failed #988
-
I'm having hard time getting Tailwind to work with snowpack following the official doc. I'm using this official app Templates: @snowpack/app-template-blank-typescript package.json {
"scripts": {
"start": "snowpack dev",
"build": "snowpack build",
"test": "echo \"This template does not include a test runner by default.\" && exit 1",
"format": "prettier --write \"src/**/*.{ts,js}\"",
"lint": "prettier --check \"src/**/*.{ts,js}\""
},
"dependencies": {
"canvas-confetti": "^1.2.0",
"tailwindcss": "^1.7.6"
},
"devDependencies": {
"@snowpack/plugin-run-script": "^2.1.1",
"@types/canvas-confetti": "^1.0.0",
"@types/snowpack-env": "^2.3.0",
"postcss-cli": "^7.1.2",
"prettier": "^2.0.5",
"snowpack": "^2.10.0",
"typescript": "^3.9.7"
}
}
postcss.config.js module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
],
}; snowpack.config.json {
"mount": {
"public": "/",
"src": "/_dist_"
},
"plugins": [
[
"@snowpack/plugin-run-script",
{ "cmd": "tsc --noEmit", "watch": "$1 --watch" }
],
[
"@snowpack/plugin-build-script",
{
"cmd": "postcss",
"input": ["src/css/index.css"],
"output": ["public/index.css"]
}
]
],
"installOptions": {
"installTypes": true
}
} src/css/index.css @import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities'; The error: snowpack
Server starting…
▼ Console
[snowpack] ! updating dependencies...
[snowpack] ! installing dependencies…
[snowpack] Package "tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities" not found. Have you installed it?
[snowpack] Install failed. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 19 replies
-
Thanks for filing! If you're using latest Snowpack, you should be able to remove |
Beta Was this translation helpful? Give feedback.
-
Same problem..., you can find a reproduction of the issue here, thank you again for your reactivity error: snowpack
Server starting…
▼ Console
[snowpack] ! updating dependencies...
[snowpack] ! installing dependencies…
[snowpack] Package "tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities" not found. Have you installed it?
[snowpack] Install failed. |
Beta Was this translation helpful? Give feedback.
-
Fixed in #991, thanks again for filing! |
Beta Was this translation helpful? Give feedback.
-
I struggled to get tailwind and snowpack working together. I tried a few different methods discussed here and per the docs: https://www.snowpack.dev/#tailwind-css @ryands17 if you have a spare minute, would you mind breaking down the path you took in the end? Perhaps a quick vanilla repo with snowpack and tailwind would be helpful. |
Beta Was this translation helpful? Give feedback.
-
With the new Tailwind 2.0 snowpack gives me this error:
My postcss config is this
|
Beta Was this translation helpful? Give feedback.
-
Same problem...but only happens when i install/uninstall some packages.
// tailwind.css @import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
.flex-center{
@apply flex justify-center items-center;
} // postcss.config.js module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
]
} I have to do several steps to fix this problem temporarily (happens again when i change any packages)
|
Beta Was this translation helpful? Give feedback.
Fixed in #991, thanks again for filing!