Closed garyblankenship closed 4 years ago
TailwindCSS is included alongside the TailwindUI package and should be installed at the same time. I've just tested this on a fresh app and it works as intended, without needing to manually run npm install tailwindcss
first.
Do you have a list of things you've done + commands you've run to reproduce this? What version of npm are you using?
My attempt was using an existing laravel 7 repository that was already using tailwindcss. I added livewire and presets with the --auth flag. I'm using npm 6.14.5 and have node v14.2.0.
I haven't run into any additional errors after installing tailwindcss again after the presets.
composer require livewire/livewire laravel-frontend-presets/tall
php artisan ui tall --auth
npm install
npm run dev
Full requires section
"require": {
"php": "^7.3",
"ext-json": "*",
"facade/ignition": "^2.0",
"fideloper/proxy": "^4.0",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel-frontend-presets/tall": "^1.7",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"livewire/livewire": "^1.1",
"nyholm/psr7": "^1.2",
"predis/predis": "^1.1",
"symfony/psr-http-message-bridge": "^2.0"
},
Do you want to close this? I'm happy to try and reinstall and see if the same conditions pose a problem again.
Hey @garyblankenship. Yes, please try with a fresh Laravel installation to see if the problem persists.
I grabbed the streams repo under my account to install. It already used tailwind and livewire also.
No errors or warnings until the npm step and then here's what I got below.
❯ npm install && npm run dev
npm WARN The package tailwindcss is included as both a dev and production dependency.
...
98% after emitting SizeLimitsPlugin
ERROR Failed to compile with 1 errors 10:02:09 AM
error in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /Users/gary/Sites/preset/node_modules/@babel/helper-compilation-targets/package.json
...
Fresh Laravel test (laravel new preset && npm install && npm run dev)
composer require livewire/livewire laravel-frontend-presets/tall
php artisan ui tall --auth
npm install && npm run dev
No issues.
The error in your app makes perfect sense because Tailwind is installed as a dependency instead of a dev dependency as is expected.
Since this seems to be a non-issue and we're only really expecting people to use the preset in new apps anyway, I'll mark this as closed. Thanks for the report anyway 👍
I had to
npm install tailwindcss
first. Then the npm run dev ran fine.