stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

Persistent Stencil CLI Configuration Issues - Unable to Start Local Development Server

Open rajeswaran140 opened this issue 11 months ago • 0 comments

Description of Issue: I'm experiencing persistent configuration issues when trying to use Stencil CLI for local theme development. After running stencil init successfully, I encounter one of two errors when trying to run stencil start:

Error: "You must have a config.json file in your top level theme directory."

This occurs despite stencil init completing successfully No config.json appears to be generated after init

Error: "Your stencil config is outdated. Please run $ stencil init again."

This occurs even after running stencil init again with a new API token Running stencil init again doesn't resolve the issue

Steps I've Already Taken:

Created a new Store-level API account with appropriate permissions (Themes modify, Channel settings modify, Sites & routes modify, etc.) Generated a new OAuth token Completely deleted and recreated the theme directory Ran stencil init with the new token Verified the theme directory structure Checked for any hidden files that might be causing conflicts

Additional Information: The errors alternate between claiming no config.json exists and saying the config is outdated. This suggests there may be an issue with how the CLI is handling configuration files or with compatibility between my store/theme and the current Stencil CLI version. Please advise on how to correctly configure Stencil CLI for local development with my store.

When submitting this ticket, I recommend also including:

Image

Screenshots of the errors A copy of your config.json file (if one exists) The output of stencil --version, node --version, and npm --version

rajeswaran140 avatar Mar 21 '25 23:03 rajeswaran140