Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I am following "Build a Shopify App with Node and React".
And I try to command "npm run dev". But this error occurs.
user@MacBook-Air poralis-chatapp % npm run dev
> poralis-chatapp@1.0.0 dev
> node server.js
/Users/user/jumboworld/poralis-chatapp/server.js:15
SCOPES: process.env.SHOPIFY_API_SCOPES.split(","),
^
TypeError: Cannot read property 'split' of undefined
at Object.<anonymous> (/Users/user/jumboworld/poralis-chatapp/server.js:15:42)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47
Please someone helps me what I can do this error.
Hi there! Looks like something is wrong with your .env file.
Does your file look like this?
SHOPIFY_API_KEY=[...]
SHOPIFY_API_SECRET=[...]
SHOP=shop.myshopify.com
SCOPES=write_products,write_customers,write_draft_orders
HOST=https://725e155f2b6a.ngrok.io
Hi there Melanie,
I am also having issues with npm run dev. Having followed all the steps in the "create your app" tutorial, when it comes to calling npm run dev, I get up to the point of the tunnel running, but then get Error - timed out. This happens all the time. I have now looked for further tutorials from last year and when following those, by using shopify app create node, shopify app serve, it does work and the app is created. However, I am also trying to follow the guidelines on the first example app, and the files of my template are completely different and I am unable to follow that when using I suppose the 'older' version of creating a first app. Do you have more documentation on the newer way, i.e. by going with npm for everything? And do you know why this error may occur when going down this route? I have tried for days now to solve this..Or what is the difference between the two options?
Thank you!
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By