jeffreyvr / tailpress

TailPress is a minimal boilerplate theme for WordPress using Tailwind CSS.
https://tailpress.io
MIT License
1.25k stars 158 forks source link

Bug with js compiling while running npm run watch #119

Closed nikolailehbrink closed 2 years ago

nikolailehbrink commented 2 years ago

Hi, I just tried to implement a JavaScript-Function, so I wrote the code in ressources/js/app.js, like it is done for the primary menu toggle. I wondered why it didn't work, so I checked the compiled js file from js/app.js and the code wasn't there. I then did a npm run watch:js separately and it seems it doesn't work and the following error message comes up:

[1] npm run watch:css-editor exited with code 1

\wp-content\themes\tailpress> npm run watch

> tailpress@3.0.0 watch
> cross-env NODE_ENV=development concurrently "npm run watch:css-app" "npm run watch:css-editor" "npm run watch:js"

[2] 
[2] > tailpress@3.0.0 watch:js
[2] > ./node_modules/.bin/esbuild "./resources/js/app.js" --bundle --outfile="./js/app.js" --watch
[2]
[0] 
[0] > tailpress@3.0.0 watch:css-app
[0] > tailwindcss -i "./resources/css/app.css" -o "./css/app.css" --postcss --watch
[0]
[1]
[1] > tailpress@3.0.0 watch:css-editor
[1] > tailwindcss -i "./resources/css/editor-style.css" -o "./css/editor-style.css" --postcss --watch
[1]
[2] The "." command is either misspelled or
[2] could not be found (translated from german for understanding purpose).
[2] npm run watch:js exited with code 1
[1] 
[1] Rebuilding...
[0]
[0] Rebuilding...
[1] Done in 3211ms.
[0] Done in 3219ms.

Do you have the same problem?

jeffreyvr commented 2 years ago

I personally don't have this issue @nikolailehbrink. Are you using Windows?

Can you perhaps try what is suggested here?: https://github.com/jeffreyvr/tailpress/issues/93#issuecomment-1072243674

nikolailehbrink commented 2 years ago

Hi, yes the solution in that thread worked! Thank you! Would be nice, if you could implement it in the final version, so that one doesnt have to do it manually on windows.