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

Issue with Watch and JS compiling #148

Open actuatedigital opened 2 years ago

actuatedigital commented 2 years ago

When running any of the watch commands it errors when trying to handle JS.

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] > cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --watch [2] [1] [1] > tailpress@3.0.0 watch:css-editor [1] > cross-env NODE_ENV=development tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --watch [1] [0] [0] > tailpress@3.0.0 watch:css-app [0] > cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --watch [0] [2] node:internal/child_process:413 [2] throw errnoException(err, 'spawn'); [2] ^ [2] [2] Error: spawn Unknown system error -86 [2] at ChildProcess.spawn (node:internal/child_process:413:11) [2] at Object.spawn (node:child_process:713:9) [2] at spawn (/node_modules/cross-spawn/index.js:12:24) [2] at crossEnv (/node_modules/cross-env/src/index.js:13:18) [2] at Object. (/node_modules/cross-env/src/bin/cross-env.js:5:1) [2] at Module._compile (node:internal/modules/cjs/loader:1126:14) [2] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) [2] at Module.load (node:internal/modules/cjs/loader:1004:32) [2] at Function.Module._load (node:internal/modules/cjs/loader:839:12) [2] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) { [2] errno: -86, [2] code: 'Unknown system error -86', [2] syscall: 'spawn' [2] } [2] npm run watch:js exited with code 1 [1] [1] Rebuilding... [0] [0] Rebuilding... [1] Done in 873ms. [0] Done in 1126ms.

I've removed the path to the theme folder from the example above.

jeffreyvr commented 2 years ago

Not able to reproduce this. What OS are you using?

actuatedigital commented 2 years ago

Hi Jeffrey,

MacOs Monterey.

Package versions are:

{ "name": "tailpress", "version": "3.0.0", "description": "Boilerplate WordPress theme with Tailwind CSS.", "author": "Jeffrey van Rossum", "repository": { "type": "git", "url": "https://github.com/jeffreyvr/tailpress" }, "theme_uri": "https://github.com/jeffreyvr/tailpress", "author_uri": "https://vanrossum.dev", "text_domain": "tailpress", "license": "MIT", "scripts": { "production:css-app": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --minify", "production:css-editor": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --minify", "production:js": "cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --minify", "dev:css-app": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss", "dev:css-editor": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss", "dev:js": "cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js", "watch:css-app": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --watch", "watch:css-editor": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --watch", "watch:js": "cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --watch", "production": "cross-env NODE_ENV=production concurrently \"npm run production:css-app\" \"npm run production:css-editor\" \"npm run production:js\"", "dev": "cross-env NODE_ENV=development concurrently \"npm run dev:css-app\" \"npm run dev:css-editor\" \"npm run dev:js\"", "watch": "cross-env NODE_ENV=development concurrently \"npm run watch:css-app\" \"npm run watch:css-editor\" \"npm run watch:js\"", "browser-sync": "cross-env NODE_ENV=development browser-sync start --proxy \"tailpress.test\" --host=\"tailpress.test\" --no-inject-changes --files=\"./\"", "watch-sync": "cross-env NODE_ENV=development concurrently \"npm run browser-sync\" \"npm run watch\"" }, "devDependencies": { @.***/tailwindcss-tailpress": "^2.0.0", "autoprefixer": "^10.4.0", "browser-sync": "^2.26.14", "concurrently": "^6.2.1", "cross-env": "^6.0.3", "esbuild": "^0.12.24", "postcss": "^8.4.4", "postcss-import": "^14.0.0", "postcss-nested": "^5.0.3", "postcss-nested-ancestors": "^2.0.0", "resolve-url-loader": "^3.1.2", "tailwindcss": "^3.1.0" }, }

We have an older version that runs fine

{ "name": "tailpress", "version": "3.0.0", "description": "Boilerplate WordPress theme with Tailwind CSS.", "author": "Jeffrey van Rossum", "repository": { "type": "git", "url": "https://github.com/jeffreyvr/tailpress" }, "theme_uri": "https://github.com/jeffreyvr/tailpress", "author_uri": "https://vanrossum.dev", "text_domain": "tailpress", "license": "MIT", "scripts": { "production:css-app": "tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --minify", "production:css-editor": "tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --minify", "production:js": "./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --minify", "dev:css-app": "tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss", "dev:css-editor": "tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss", "dev:js": "./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js", "watch:css-app": "tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --watch", "watch:css-editor": "tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --watch", "watch:js": "./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --watch", "production": "cross-env NODE_ENV=production concurrently \"npm run production:css-app\" \"npm run production:css-editor\" \"npm run production:js\"", "dev": "cross-env NODE_ENV=development concurrently \"npm run dev:css-app\" \"npm run dev:css-editor\" \"npm run dev:js\"", "watch": "cross-env NODE_ENV=development concurrently \"npm run watch:css-app\" \"npm run watch:css-editor\" \"npm run watch:js\"", "browser-sync": "cross-env NODE_ENV=development browser-sync start --proxy \"tailpress.test\" --host=\"tailpress.test\" --no-inject-changes --files=\"./\"", "watch-sync": "concurrently \"npm run browser-sync\" \"npm run watch\"" }, "devDependencies": { @.***/tailwindcss-tailpress": "^0.1.0", "autoprefixer": "^10.4.0", "browser-sync": "^2.26.14", "concurrently": "^6.2.1", "cross-env": "^6.0.3", "esbuild": "^0.12.24", "postcss": "^8.4.4", "postcss-import": "^14.0.0", "postcss-nested": "^5.0.3", "postcss-nested-ancestors": "^2.0.0", "resolve-url-loader": "^3.1.2", "tailwindcss": "^3.0.0" } }

[image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11& Sender notified by Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11& 16/09/22, 10:24:32

On Thu, 15 Sept 2022 at 13:36, Jeffrey van Rossum @.***> wrote:

Not able to reproduce this. What OS are you using?

— Reply to this email directly, view it on GitHub https://github.com/jeffreyvr/tailpress/issues/148#issuecomment-1248043170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ6ZIMYRHYHJX4I4JKGKYBDV6MJ4HANCNFSM6AAAAAAQMFCXGI . You are receiving this because you authored the thread.Message ID: @.***>

--

Mat O'Connor Founder/Developer [image: Actuate Digital Ltd]

T: 0161 672 0877 <+441616720877> M: 07572 435911 <+447572435911> W: actuate.agency https://www.actuate.agency

[image: Facebook] actuateagency https://www.facebook.com/actuateagency [image: Twitter] actuate_agency https://twitter.com/actuate_agency [image: LinkedIn] company/actuatedigital https://www.linkedin.com/company/actuatedigital

Address: Colony, 5 Piccadily Place, Manchester M1 3BR Disclaimer: This email and any files transmitted with it are confidential and intended only for the individuals or entities to whom they are addressed. If you have received this email in error please notify the sender by return email and then delete the email and any files transmitted with it from your system. Use, disclosure, distribution or copying of any information received by yourself in error is prohibited.

s-wild commented 1 year ago

I get this error too, I am using Volta node@18 on my macOS Ventura 13.2.

I fixed it by running:

export NODE_ENV=development