Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Running into an error about user access upon installing Hydrogen

Solved

Running into an error about user access upon installing Hydrogen

noahw52
Shopify Partner
4 0 0

When I try to install hydrogen via "npm create @Shopify/hydrogen@latest" I am able to make it where I link my shopify account, I select the shop to login to, it says I have successfully logged in, and then when I give a name for my storefront I run into an issue. The error reads: "Failed to initialize project: The Admin GraphQL API responded unseccessfully with the HTTp status 200 and errors: "Access denied for hydrogenStorefrontCreate field. Required access: User │
│ must have full access to apps or access to the Hydrogen channel.",

 

I have gone into my shopify store and there's not options for me to allow myself anymore access because I am already the admin and store owner. I cannot figure out the issue I'm running into, any help would be much appreciated.

Accepted Solution (1)

johnny2smooth
Shopify Partner
2 1 2

This is an accepted solution.

Hi @noahw52 ,

 

I found a solution. 

 

1. Init the project with `npm create @shopify/hydrogen@latest` 

2. Select `Use sample data from Mock.shop (no login required)` and finish other CLI steps

3. cd into the project, go to your .env file and edit/add:  PUBLIC_STORE_DOMAIN,  PRIVATE_STOREFRONT_API_TOKEN,  PUBLIC_STOREFRONT_API_TOKEN ... to reflect your own store's info (steps to set up tokens here https://shopify.dev/docs/custom-storefronts/building-with-the-storefront-api/getting-started)

 

I know that this is more cumbersome than a quick CLI command, but I hope that it helps.

 

View solution in original post

Replies 10 (10)

DionneChelini
Shopify Partner
3 0 1

I am also experiencing the same problem. I am having a better look into it now, I'll let you know if I figure it out

 

noahw52
Shopify Partner
4 0 0

Wonderful. Please let me know when you figure it out. I'm not sure if this is so in your case, but I'm able to get it to work if i use the moc store information option instead of connecting the store I have tied to my account.

dji38
Shopify Partner
1 0 0

Same  problem for me let me know if you find the solution

johnny2smooth
Shopify Partner
2 1 2

This is an accepted solution.

Hi @noahw52 ,

 

I found a solution. 

 

1. Init the project with `npm create @shopify/hydrogen@latest` 

2. Select `Use sample data from Mock.shop (no login required)` and finish other CLI steps

3. cd into the project, go to your .env file and edit/add:  PUBLIC_STORE_DOMAIN,  PRIVATE_STOREFRONT_API_TOKEN,  PUBLIC_STOREFRONT_API_TOKEN ... to reflect your own store's info (steps to set up tokens here https://shopify.dev/docs/custom-storefronts/building-with-the-storefront-api/getting-started)

 

I know that this is more cumbersome than a quick CLI command, but I hope that it helps.

 

gonza1
Visitor
1 0 1

URL not found

Weevil
Visitor
1 0 0
noahw52
Shopify Partner
4 0 0

Thank you so much! I will try this either tonight or tomorrow and see if it works.

DionneChelini
Shopify Partner
3 0 1
Thanks, appreciate it

noahw52
Shopify Partner
4 0 0

Thank you so much! This did end up working out for me and now I can see my storefront as i edit it. 

HammadHamdani
Shopify Partner
1 0 2

But my problem is that command( npm create @Shopify/hydrogen@latest ) is not working.
I'm using latest version of npm and Node according to that Hydrogen Docs.Screenshot 2024-04-03 115137.png