-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
After cloning the repo and performing the following steps
- Running
npm inatll - Renaming the env file to .env
- Updating the .env file with the claude API key
CLAUDE_API_KEY=your_claude_api_key - Making sure I have credits
- Running a test curl command to confirm the API key works
#!/bin/sh
curl https://api.anthropic.com/v1/messages \
--header "x-api-key: $ANTHROPIC_API_KEY" \
--header "anthropic-version: 2023-06-01" \
--header "content-type: application/json" \
--data \
'{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude"}
]
}'
- Running the project locally by running this command
shopify app dev --use-localhost - Installing the latest shopify app
npm install -g @shopify/cli@latest - After running
shopify app dev --use-localhost --resetand setting up everything I stop the server - I start the server again by running
shopify app dev --use-localhost - I make sure this happens I make sure this happens
? --use-localhost requires a certificate forlocalhost`. Generate it now?
Yes, use mkcert to generate it`
- The app is installed and I enable embed for my theme
- I open the browser and see the icon to start the chat
- I start the chat by asking
can you show me snowboards - I get a response
Sorry, I couldn't process your request. Please try again later. - In the console I see
React Router │ Connected to MCP with 5 tools
React Router │ Connected to customer MCP with 4 tools
React Router │ Error processing streaming request: AuthenticationError: 401
{"error":"AuthenticationError","location":"proxy","log_level":"warn","description":"The proxy threw an 'AuthenticationError' error","reason":"Invalid X-Api-Key
header format. See https://openai-proxy.shopify.io","details":null}
React Router │ at APIError.generate
(file:///Users/jaikirdatt/dev/shop-chat-agent/node_modules/@anthropic-ai/sdk/src/core/error.ts:67:14)
React Router │ at Anthropic.makeStatusError
(file:///Users/jaikirdatt/dev/shop-chat-agent/node_modules/@anthropic-ai/sdk/src/client.ts:443:28)
React Router │ at Anthropic.makeRequest
(file:///Users/jaikirdatt/dev/shop-chat-agent/node_modules/@anthropic-ai/sdk/src/client.ts:678:24)
React Router │ at processTicksAndRejections (node:internal/process/task_queues:103:5) {
My package.json has
"dependencies": {
"@prisma/client": "^6.2.1",
"@react-router/fs-routes": "^7.10.1",
"@react-router/node": "^7.10.1",
"@react-router/serve": "^7.10.1",
"@shopify/app-bridge-react": "^4.1.6",
"@shopify/shopify-app-react-router": "^1.0.0",
"@shopify/shopify-app-session-storage-prisma": "^7.0.0",
"isbot": "^5.1.0",
"prisma": "^6.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^7.10.1",
"vite-tsconfig-paths": "^5.0.1",
"@anthropic-ai/sdk": "^0.71.2",
"dotenv": "^16.3.1"
},
"devDependencies": {
"@react-router/dev": "^7.10.1",
"@shopify/api-codegen-preset": "^1.1.1",
"@shopify/polaris-types": "^1.0.0",
"@types/eslint": "^9.6.1",
"@types/node": "^22.2.0",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^3.2.4",
"typescript": "^5.2.2",
"vite": "^6.2.2"
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels