Hi so I’m building a Shopify App that makes heavy use of this. Everything was working fine locally but then I had to use Next.js and this error started happening.
Unhandled Rejection (TypeError): Cannot read property ‘defineProperties’ of undefined
Its happening on the first Object.defineProperties, meaning Object is undefined. I think its an issue with webpack or babel but there isn’t much online any advice.
My package.json
{
“name”: “sample-embedded-app”,
“version”: “1.0.0”,
“description”: “”,
“main”: “index.js”,
“scripts”: {
“test”: “echo “Error: no test specified” && exit 1”,
“dev”: “node server.js”,
“build”: “next build”,
“start”: “next start”
},
“keywords”: [],
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“@shopify/koa-shopify-auth”: “^3.1.7”,
“@shopify/koa-shopify-graphql-proxy”: “^2.1.3”,
“@shopify/koa-shopify-webhooks”: “^1.1.4”,
“@shopify/polaris”: “^3.2.1”,
“@zeit/next-css”: “^1.0.1”,
“@zeit/next-sass”: “^1.0.1”,
“apollo-boost”: “^0.1.22”,
“axios”: “^0.18.0”,
“dotenv”: “^6.1.0”,
“gojs”: “^2.0.8”,
“graphql”: “^14.0.2”,
“isomorphic-fetch”: “^2.2.1”,
“js-cookie”: “^2.2.0”,
“koa”: “^2.6.2”,
“koa-router”: “^7.4.0”,
“koa-session”: “^5.10.0”,
“next”: “^7.0.2”,
“node-sass”: “^4.11.0”,
“react”: “^16.6.3”,
“react-apollo”: “^2.3.2”,
“react-dom”: “^16.6.3”,
“store-js”: “^2.0.4”
}
}