First app problem

New Member
1 0 2

I tried to create a sample app using the steps mentioned in the documentation. However I got the following error. Does anyone have any suggestions to resolve this:

> Ready on http://localhost:3000

TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, TypedArray, or DataView. Received type undefined
at new Hmac (internal/crypto/hash.js:88:11)
at Object.createHmac (crypto.js:133:10)
at sign (C:\Temp\shopify-demo-app-node-react-embed-your-app-in-shopify-starter-files\node_modules\keygrip\index.js:22:8)
at Keygrip.sign (C:\Temp\shopify-demo-app-node-react-embed-your-app-in-shopify-starter-files\node_modules\keygrip\index.js:29:38)
at Cookies.set (C:\Temp\shopify-demo-app-node-react-embed-your-app-in-shopify-starter-files\node_modules\cookies\index.js:109:30)
at ContextSession.save (C:\Temp\shopify-demo-app-node-react-embed-your-app-in-shopify-starter-files\node_modules\koa-session\lib\context.js:332:22)
at ContextSession.commit (C:\Temp\shopify-demo-app-node-react-embed-your-app-in-shopify-starter-files\node_modules\koa-session\lib\context.js:238:16)
at session (C:\Temp\shopify-demo-app-node-react-embed-your-app-in-shopify-starter-files\node_modules\koa-session\index.js:46:20)
at process._tickCallback (internal/process/next_tick.js:68:7)

2 Likes
Highlighted
Shopify Partner
9 0 3

bump

0 Likes
Highlighted
Explorer
80 15 17

I had the same problem and it turns out my environment variables were not setup properly.

 

If you're having the same issue check if your environment variables are correctly assigned, specially the ones that contain the Shopify API key and secret.

- Yes, we build Shopify Apps. Hit me with your idea: https://vellir.tech
- Let customers preview your products and easily add them to cart with Peek Mode
- Add free, good looking social share icons with built-in analytics to your store with Share Lab
1 Like
Highlighted
Tourist
5 1 4

p_khanna, check your .env file in your project root folder, there may be something wrong there like spaces or strange characters.

0 Likes