I’m running macOS Ventura v13.4.1 and I installed Gulp with brew. During install I had a message:
gulp has been officially discontinued upstream.
It may stop working correctly (or at all) in recent versions of macOS.
When I run yarn dev I have an error: /bin/sh: gulp: command not found. I try to open Gulp from the Application folder and have an error:
“gulp” needs to be updated. The developer of this app needs to update it to work with this version of macOS. Contact the developer for more information.
How can I fix it to run yarn command on macOS?
Are there any alternative ways to easily compile /assets/css/ in the Casper theme?
The Node theme scripts leverage Gulp anyway, which doesn’t work on my machine.
I ran both commands inside theme folder, both returned error. Do you have any idea why?
casper-stage % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: **minimal**@**5.5.3**
npm ERR! Found: **postcss**@**8.2.13**
npm ERR! node_modules/postcss
npm ERR! dev **postcss**@"**8.2.13**" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer **postcss**@"**^8.2.15**" from **cssnano**@**5.1.12**
npm ERR! node_modules/cssnano
npm ERR! dev **cssnano**@"**5.1.12**" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/user/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2023-07-25T22_23_15_783Z-debug-0.log
user@root casper-stage % npm run zip
> minimal@5.5.3 zip
> gulp zip
sh: gulp: command not found
I try to fix it by running npm install --legacy-peer-deps. It resulted in a lot of errors and warning and suggested to run npm audit fix --force, which I did. Then I tried to zip it once again:
user@root-MBP casper-stage % npm run zip
> minimal@5.5.3 zip
> gulp zip
fs.js:42
} = primordials;
^
ReferenceError: primordials is not defined
at fs.js:42:5
at req_ (/Users/user/Documents/Ghost/content/themes/casper-stage/node_modules/natives/index.js:143:24)
at Object.req [as require] (/Users/user/Documents/Ghost/content/themes/casper-stage/node_modules/natives/index.js:55:10)
at Object.<anonymous> (/Users/user/Documents/Ghost/content/themes/casper-stage/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
Node.js v18.13.0
EDIT: It worked after I tried npm install --force once again. Now zip command runs correctly!