Getting Internal Server Error when trying to install embedded app on developement store

When I try to install embedded app on developement store, it is showing Internal Server Error. When running on local server, it works properly. But on developemt store, it is giving error while installation. I have added shopify api key and shopify secrete key properly in .env file, still getting an error. In server.js i have tried both the options dotenv.config({path:‘process.env’}); and dotenv.config();. Still getting same Internal Server Error. Following is the code in my server.js file-

require('isomorphic-fetch');
const Koa = require('koa');
const next = require('next');
const { default: createShopifyAuth } = require('@shopify/koa-shopify-auth');
const dotenv = require('dotenv');
const { verifyRequest } = require('@shopify/koa-shopify-auth');
const session = require('koa-session');

dotenv.config({path:'process.env'});

const port = parseInt(process.env.PORT, 10) || 3000;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();

const { SHOPIFY_API_SECRET_KEY, SHOPIFY_API_KEY } = process.env;

app.prepare().then(() => {
  const server = new Koa();
  server.use(session({ sameSite: 'none', secure: true }, server));
  server.keys = [SHOPIFY_API_SECRET_KEY];

  server.use(
    createShopifyAuth({
      apiKey: SHOPIFY_API_KEY,
      secret: SHOPIFY_API_SECRET_KEY,
      scopes: ['read_products'],
      afterAuth(ctx) {
        const { shop, accessToken } = ctx.session;

        ctx.redirect('/');
      },
    }),
  );

  server.use(verifyRequest());
  server.use(async (ctx) => {
    await handle(ctx.req, ctx.res);
    ctx.respond = false;
    ctx.res.statusCode = 200;

  });

  server.listen(port, () => {
    console.log(`> Ready on http://localhost:${port}`);
  });
});

In terminal I m getting this error -

TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObje
ct. Received undefined
      at prepareSecretKey (internal/crypto/keys.js:304:11)
      at new Hmac (internal/crypto/hash.js:113:9)
      at Object.createHmac (crypto.js:143:10)
      at sign (C:\xampp\htdocs\shopify\AtomChat\node_modules\keygrip\index.js:23:8)
      at Keygrip.sign (C:\xampp\htdocs\shopify\AtomChat\node_modules\keygrip\index.js:30:38)
      at Cookies.set (C:\xampp\htdocs\shopify\AtomChat\node_modules\cookies\index.js:110:30)
      at oAuthStart (C:\xampp\htdocs\shopify\AtomChat\node_modules\@shopify\koa-shopify-auth\dist\src\auth\create-oauth-start.js:18:21)
      at C:\xampp\htdocs\shopify\AtomChat\node_modules\@shopify\koa-shopify-auth\dist\src\auth\index.js:55:46
      at step (C:\xampp\htdocs\shopify\AtomChat\node_modules\tslib\tslib.js:141:27)
      at Object.next (C:\xampp\htdocs\shopify\AtomChat\node_modules\tslib\tslib.js:122:57)