Muetze42 / nova-assets-changer

Change Nova resources.
https://novapackages.com/packages/norman-huth/nova-assets-changer
MIT License
25 stars 4 forks source link

css fails to mix #19

Closed MenC-Didam closed 1 year ago

MenC-Didam commented 2 years ago

Description:

ERROR in ./resources/css/app.css Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): SyntaxError

/home/vagrant/code/.vapor/build/app/vendor/laravel/nova/resources/css/app.css @layer utilities is used but no matching @tailwind utilities directive is present.

Detailed steps to reproduce the issue on a fresh Nova installation:

Have some override present such as MainHeader.vue run php artisan nova:custom-asset

I ran some older version of Nova starting from Nova version 4.0.6 it breaks, I noticed composer then updates also this package to 1.1.6, and here it break. Seems also Nova introduced some breaking changes in there later versions. For now i will stick on Nova 4.5 since that works including the asset changer.

Muetze42 commented 2 years ago

My projects all run through. Does the error still exist after today's Nova update?

MenC-Didam commented 2 years ago

I have tested it from Nova 4.0.0 al the way to the latest version. From Nova 4.0.6 it breaks because of the error i just send. It's not my code, it's in the vendor space.

scramatte commented 2 years ago

Not sure same issue, but after install this package over fresh laravel 9 + nova 4 (latest version) I get following error:

Unable to locate Mix file: /app.css. (View: /opt/eom/vendor/laravel/nova/resources/views/layout.blade.php)

Muetze42 commented 2 years ago

Are the assets im published?

php artisan nova:publish
scramatte commented 2 years ago

Hi,

Yes assets are published and files are present in public/vendor/nova

Looks that the function {{ mix(…) }} has different behaviour as don’t search files into proper path specified by 2nd argument

Enviado desde mi iPhone

El 16 sept 2022, a las 6:57, Norman Huth @.***> escribió:



Are the assets im published?

php artisan nova:publish

— Reply to this email directly, view it on GitHubhttps://github.com/Muetze42/nova-assets-changer/issues/19#issuecomment-1248919262, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABOCXURKSCIJK4OQKM24ZLV6P435ANCNFSM6AAAAAAQME22CM. You are receiving this because you commented.Message ID: @.***>

Muetze42 commented 2 years ago

So. Currently I'm working on my HelloFresh database, where Nova is also running. This and 3 other projects are running in which I keep Nova up to date and this package is running. And this page even includes the feature of a new page (registration), which is not even in the documentation yet.
There have been no problems there so far and it can't be reproduced like this.

As now always have the big puzzle guess.

I will look the weekend of course again. The missing import into the CSS I have also had solved dirty first.

Is it possible to get access to a repo where this error occurs or alternatively a list of installed packages? So I can save myself to go through possible workcases.

torosegon commented 2 years ago

Hello @Muetze42, we have a same issue. All nova asset is published (v4.14.3).

After running php artisan nova:customer-assets have a issue:

Processing js/components/CardWrapper.vue
Processing js/components/Cards.vue
Processing js/components/Metrics/ValueMetric.vue
Processing js/components/Metrics/Base/BaseValueMetric.vue
Processing js/layouts/Footer.vue
Run NPM production

> production
> mix --production

ℹ Compiling Mix
✔ Mix: Compiled with some errors in 19.53s
ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
SyntaxError

(1153:1) /Users/.../vendor/laravel/nova/resources/css/app.css `@layer utilities` is used but no matching `@tailwind utilities` directive is present.

  1151 | /* Utilities
  1152 | ------------------------------------------------------------------------------*/
> 1153 | @layer utilities {
       | ^
  1154 |   .flex-break {
  1155 |     flex-basis: 100%;

resources/css/app.css was deleted in my project.

torosegon commented 2 years ago

Nova 4.14.0 is works fine.

scramatte commented 2 years ago

Hello @Muetze42

I've got same issue as @torosegon with Nova 4.14.3 and 4.14.0 Looks they reference same issue here https://github.com/tailwindlabs/tailwindcss/discussions/5934

Regards

Muetze42 commented 1 year ago

Tested on Mac:

https://github.com/Muetze42/nova-assets-changer/releases/tag/1.2.0