diff --git a/packages/passport/sdk/package.json b/packages/passport/sdk/package.json index ef6f91e20f..f94cdcb1b5 100644 --- a/packages/passport/sdk/package.json +++ b/packages/passport/sdk/package.json @@ -31,7 +31,6 @@ "@types/axios": "^0.14.0", "@types/jest": "^29.4.3", "@types/jwt-encode": "^1.0.1", - "@types/node": "^18.14.2", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@typescript-eslint/eslint-plugin": "^5.57.1", diff --git a/packages/passport/sdk/src/utils/logger.ts b/packages/passport/sdk/src/utils/logger.ts index 4856f881b5..f812440c99 100644 --- a/packages/passport/sdk/src/utils/logger.ts +++ b/packages/passport/sdk/src/utils/logger.ts @@ -1,6 +1,9 @@ -const shouldLog: boolean = process?.env?.JEST_WORKER_ID === undefined; - const warn = (...args: any[]) => { + if (typeof process === 'undefined') { + return; + } + + const shouldLog: boolean = process?.env?.JEST_WORKER_ID === undefined; if (shouldLog) { // eslint-disable-next-line no-console console.warn(...args); diff --git a/yarn.lock b/yarn.lock index d0d7d0069e..62513cb019 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3719,7 +3719,6 @@ __metadata: "@types/axios": ^0.14.0 "@types/jest": ^29.4.3 "@types/jwt-encode": ^1.0.1 - "@types/node": ^18.14.2 "@types/react": ^18.0.28 "@types/react-dom": ^18.0.11 "@typescript-eslint/eslint-plugin": ^5.57.1