Sage Yarn build is generating an error : error "Couldn't find a package.json file in "/site/web/app/themes"

Hello,

I have an error when trying to install Sage after running yarn build command :

error Couldn't find a package.json file in "/site/web/app/themes"

and I don’t understand why.
Shouldn’t the package.json file have been generated before ?

Thanks for any help !

Regards,

David

When you download SAGE theme in wp-content/themes using composer, package.json is there in your SAGE theme root.

Best Of Luck.

Okay, thanks, that’s what I did but maybe in the wrong directory ?
In the documentation, it’s said:
“Install Sage using Composer from your WordPress themes directory”
so I did it in /app/themes/my-theme/not in /wp/wp-content/themes/my-theme/`directory, it looked more logic to me.
I’ll do it your way !

Mmmm … I think maybe it’s because I didn’t run yarn && yarn build in my-theme directory, and did it in themes directory :blush:

Sorry for that !

This topic was automatically closed after 42 days. New replies are no longer allowed.