Andi1982's avatar

Problems installing breeze

Hey there,

I am developing some API with Laravel 10 and now would like to put some configuration UI on top. So I decided to install the breeze starterkit. But it really drives me crazy. I am not that experienced frontend guy, so I hope to get little support here.

I started like that

composer update
npm install
composer require laravel/breeze --dev

till there it worked fine. But then I tried

php artisan breeze:install

I answered the questions and decided to use blade version and later ther was an error

(node:2220) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
[Failed to load PostCSS config: Failed to load PostCSS config (searchPath: D:/workspace/projek1/trunk): [SyntaxError] Unexpected token 'export'

It also comes up when I run "npm run dev".

Does anybody know how to fix this?

My setups is working on windows with ubuntu 22.04 in a virtualbox-vm. I develop on windows with shared folder into virtualbox. Its like a homestead setup.

best regards andi

0 likes
5 replies
Andi1982's avatar

@s4muel thank you very much. This was the reason! Sud but think that there are that kind of changes within a major version.

Thanks a lot!

1 like
Tray2's avatar

I'm guessing that you get that error when running npm run dev. Breeze uses Tailwind and it requires postcss, so make sure that you have it installed,

aleahy's avatar

There was a change in breeze a while ago that made the package ESM only. It works in new installs of laravel, but if you have an older install, then there might be a clash. The simple fix is to change export defaults {... in postcss.config.js to module.exports = {...

You can read more about the change here: https://github.com/laravel/vite-plugin/pull/189

1 like
Andi1982's avatar

@aleahy also thank you, as said above, this was the reason. I think I should do more frontend stuff to get used on all these tools

Please or to participate in this conversation.