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

Stencil start Error Status code 401 Can any one help!

Open amanuser opened this issue 1 year ago • 6 comments

Hi, I am getting Stencil start (Status code 401) Error can any one help! node --version v14.21.3 npm --version 8.19.4 stencil --version 7.0.0 nvm --version 0.31.0

stencil init completed successfully You are now ready to go! To start developing, run $ stencil start

Error When I run stencil start

No api host found in config file, falling back to https://api.bigcommerce.com. You may need to run 'stencil init' again.
not ok -- Error: Could not fetch a list of the store channels: Request failed with status code 401

amanuser avatar Apr 05 '23 14:04 amanuser

I’m also getting this error when running the command via GitHub Actions, though locally it works fine.

nathanaelphilip avatar Apr 12 '23 12:04 nathanaelphilip

try adding --apiHost https://api.bigcommerce.com to your stencil init cmd

khoallaby avatar Apr 14 '23 15:04 khoallaby

it has that. locally it works fine, but when running in GitHub actions, that’s when I usually get the error:

stencil init -u $URL -t $TOKEN --apiHost https://api.bigcommerce.com -p 3000

nathanaelphilip avatar Apr 14 '23 15:04 nathanaelphilip

I am not sure about Github actions @amanuser but have you 100% api access on your account and set up those Oauth tokens? Are you also running the supported version of Node and Npm of the version of stencil you are using?

bc-stephen-hilliard avatar Jul 20 '23 18:07 bc-stephen-hilliard

nvm version 18.15.0 node version 18.15.0

? What port would you like to run the server on? 3000 Set API host to: https://api.bigcommerce.com You are now ready to go! To start developing, run $ stencil start

E:\BigCommerce\Cornerstone>stencil start No api host found in config file, falling back to https://api.bigcommerce.com. You may need to run 'stencil init' again.

not ok -- Error: Could not fetch a list of the store channels: Request failed with status code 401

Please visit the troubleshooting page https://developer.bigcommerce.com/stencil-docs/deploying-a-theme/troubleshooting-theme-uploads. If this error persists, please visit https://github.com/bigcommerce/stencil-cli/issues and submit an issue.

Thamu123 avatar Sep 09 '23 05:09 Thamu123

+1 experiencing the same issue. Nothing in my configuration has changed but every stencil command is a 401 in a github action

bcomerford avatar Apr 13 '24 23:04 bcomerford