I’m using EnvironmentVariablesManager
from the @mondaycom/apps-sdk npm package (latest version 3.0.11).
In a Typescript file auth.ts
, I’m trying to read environment variables to initialize NextAuth (v5, beta) which I’m using to authenticate the user to my app.
import NextAuth from "next-auth";
import { EnvironmentVariablesManager } from "@mondaycom/apps-sdk";
new EnvironmentVariablesManager({ updateProcessEnv: true });
export const { auth, handlers, signIn, signOut } = NextAuth({
...
}
This compilation error occurs:
./node_modules/app-root-path/lib/app-root-path.js
Critical dependency: the request of a dependency is an expression
Import trace for requested module:
./node_modules/app-root-path/lib/app-root-path.js
./node_modules/app-root-path/index.js
./node_modules/@mondaycom/apps-sdk/dist/esm/utils/local-db.js
./node_modules/@mondaycom/apps-sdk/dist/esm/secure-storage/secure-storage.local.js
./node_modules/@mondaycom/apps-sdk/dist/esm/secure-storage/index.js
./node_modules/@mondaycom/apps-sdk/dist/esm/index.js
./src/auth.ts
./src/app/layout.tsx
How do I fix this?