JeffreyWay / laravel-mix-tailwind

mix.tailwind()
347 stars 25 forks source link

Cannot find config file #14

Closed f-liva closed 5 years ago

f-liva commented 5 years ago

I got this error

D:\Progetti\laravel-vivicity\node_modules\tailwindcss\lib\lib\registerConfigAsDependency.js:14 throw new Error(Specified Tailwind config file "${configFile}" doesn't exist.`); ^

Error: Specified Tailwind config file "D:\Progetti\laravel-vivicity\tailwind.js" doesn't exist. at _default (D:\Progetti\laravel-vivicity\node_modules\tailwindcss\lib\lib\registerConfigAsDependency.js:14:11) at _postcss.default.plugin.config (D:\Progetti\laravel-vivicity\node_modules\tailwindcss\lib\index.js:62:58) at creator (D:\Progetti\laravel-vivicity\node_modules\tailwindcss\node_modules\postcss\lib\postcss.js:133:35) at Tailwind.boot (D:\Progetti\laravel-vivicity\node_modules\laravel-mix-tailwind\index.js:25:29) at Mix.listen (D:\Progetti\laravel-vivicity\node_modules\laravel-mix\src\components\ComponentFactory.js:56:41) at events.(anonymous function).forEach.handler (D:\Progetti\laravel-vivicity\node_modules\laravel-mix\src\Dispatcher.js:34:47) at Array.forEach () at Dispatcher.fire (D:\Progetti\laravel-vivicity\node_modules\laravel-mix\src\Dispatcher.js:34:28) at Mix.dispatch (D:\Progetti\laravel-vivicity\node_modules\laravel-mix\src\Mix.js:113:25) at Object. (D:\Progetti\laravel-vivicity\node_modules\laravel-mix\setup\webpack.config.js:19:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\fede9\AppData\Roaming\npm-cache_logs\2019-06-17T08_07_39_187Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ watch: npm run development -- --watch npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ watch script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\fede9\AppData\Roaming\npm-cache_logs\2019-06-17T08_07_39_226Z-debug.log`

Maybe because the laravel mix plugin is based on tailwind 0.x?

mvdnbrk commented 5 years ago

@fede91it You can use this package which is compatible with both Tailwind v0.x as v1.x.

shane-smith commented 5 years ago

Alternatively, simply update your webpack.mix.js configuration to point to the new filename.

For example, change this:

.tailwind();

To this instead:

.tailwind('tailwind.config.js');

You may need to make additional changes as well, if you are upgrading from v0.7.4. For example, changing @tailwind preflight to @tailwind base (likely in app.scss).

marayshi commented 5 years ago

In /node_modules/laravel-mix-tailwind/index.js update register(configPath = './tailwind.js') To register(configPath = './tailwind.config.js')