bigcommerce / stencil-cli

BigCommerce Stencil emulator for local theme development
https://developer.bigcommerce.com/stencil-docs
BSD 4-Clause "Original" or "Old" License
102 stars 142 forks source link

Stencil start Error Status code 401 Can any one help! #1090

Open amanuser opened 1 year ago

amanuser commented 1 year ago

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
nathanaelphilip commented 1 year ago

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

khoallaby commented 1 year ago

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

nathanaelphilip commented 1 year ago

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

bc-stephen-hilliard commented 1 year ago

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?

Thamu123 commented 1 year ago

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.

bcomerford commented 5 months ago

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