Missing config.json stencil CLI

Viewed 332

I'm trying to do some work for a client, but cannot get their bigcommerce site running locally. I have installed stencil CLI (v3.1.1) and downloaded the theme from the bigcommerce dashboard (all files). from the root of the theme i ran "stencil init", then "npm i" and "stencil start".

when i run stencil start, it throws an error saying there's no config.json file.

this is the error i get

How do i generate the config.json file?

The only config file I see is config.stencil.json.

I have also tried running "stencil pull" in hopes that it would pull the config, but it throws another error: "not ok -- Error: Could not fetch active theme details for channel 1: Request failed with status code 404"

Stencil-cli version: 3.1.1

Node version: 12

NPM version: 6.14.15

OS: mac big sur

1 Answers

Stencil 3.1.1 has been deprecated for some time now. I believe the current version is 3.8. As of 4 months ago, anything below 3.5 will not run (https://developer.bigcommerce.com/changelog#publications/required-stencil-cli-version-set-to-3-5-0).

If you don't have a config.json file in your project, you will need to get the one from the client's store. Try downloading their theme again. It should come through.

Edit: It is possibly the case that you need a new API token. Try making a new one for your store. Make sure the following scopes are set:

  • Themes: Modify
  • Settings & Information: Modify
  • Sites & Routes: Read-only (or Modify)

Documentation for creating a new API account: https://support.bigcommerce.com/s/article/Store-API-Accounts#creating

Related