Npm run zip (problem can't run)

Hi,
I downloaded the casper theme.
Copy the folder and rename it for my theme.
I follow this tutorial.

In my terminal when i use the : npm run zip i get this result

 npm run zip

> casper@5.4.10 zip
> gulp zip

'gulp' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

‘gulp’ is not recognized as an internal command
or external, an executable program or a batch file.

nothing works :sweat_smile:

And if i use the command : npm install i get errors too

I don’t understand and newbie using ghost.

thanks in advance

Welcome to the Ghost community, @jean-mi.

Are you attempting this on your Ghost server or a local PC or laptop?

Moreover, are you tweaking Casper or using it as the basis for a new custom theme?

If it’s the former, you may find cose injection or editing the theme locally easier.

On a local laptop; I installed Ghost and start to work with…

I copy the casper folder and rename it, then i work from there.

Yes i started to use code injection as well

I want to learn how to build my theme from Casper and then run zip for upload it.
I have the above errors

You’re on the right track that you need npm install in the Casper theme folder. What are the error messages?

I understood that Gulp was missing, also i installed it

C:\Ghost\content\themes\agenceweb  (casper@5.4.10)
λ npm install -g gulp-cli
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated

added 268 packages in 17s

10 packages are looking for funding
  run `npm fund` for details

C:\Ghost\content\themes\agenceweb  (casper@5.4.10)
λ npm run zip

> casper@5.4.10 zip
> gulp zip

[11:47:49] Local modules not found in C:\Ghost\content\themes\agenceweb
[11:47:49] Try running: npm install

And after i lunch : npm install

C:\Ghost\content\themes\agenceweb  (casper@5.4.10)
λ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: casper@5.4.10
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!
npm ERR! For a full report see:
npm ERR! C:\Users\Jean-Mi\AppData\Local\npm-cache\_logs\2023-05-14T09_48_27_752Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\Jean-Mi\AppData\Local\npm-cache\_logs\2023-05-14T09_48_27_752Z-debug-0.log

I copied the casper Theme and rename as “agenceweb” so i ran my command line from this folder now.

Hello @jean-mi
Please try the following steps:

  1. In your package.json, change the version of postcss to 8.4.23 and then run npm install.
  2. Once npm install is finished, execute npm run zip
    If everything goes well :crossed_fingers:, it should create the zip file in your dist directory.
    postcss

Thank’s i try to do it but same

You’ll also need to install Node, if it isn’t already installed. Install Node on macOS, Windows, and Linux