antfu-collective / vite-ssg

Static site generation for Vue 3 on Vite
MIT License
1.31k stars 135 forks source link

build issue with oidc-client #234

Open ranjanngc opened 2 years ago

ranjanngc commented 2 years ago

Getting window is not defined issue - `[vite-ssg] An internal error occurred. [vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues D:\Assemble\src\core-vue-app\src\vue-frontend-app\node_modules\oidc-client\lib\oidc-client.min.js:8080 url = url || window.location.href; ^

ReferenceError: window is not defined at Function.notifyParent (D:\Assemble\src\core-vue-app\src\vue-frontend-app\node_modules\oidc-client\lib\oidc-client.min.js:8080:22) at IFrameNavigator.callback (D:\Assemble\src\core-vue-app\src\vue-frontend-app\node_modules\oidc-client\lib\oidc-client.min.js:7954:40) at UserManager._signinCallback (D:\Assemble\src\core-vue-app\src\vue-frontend-app\node_modules\oidc-client\lib\oidc-client.min.js:12552:26) at UserManager.signinSilentCallback (D:\Assemble\src\core-vue-app\src\vue-frontend-app\node_modules\oidc-client\lib\oidc-client.min.js:12378:21) at new AuthService (file:///Assemble/src/core-vue-app/src/vue-frontend-app/.vite-ssg-temp/main.mjs:1102:22) at file:///Assemble/src/core-vue-app/src/vue-frontend-app/.vite-ssg-temp/main.mjs:1151:21 at ModuleJob.run (node:internal/modules/esm/module_job:185:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:281:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)`

mrhammadasif commented 1 year ago

Did you tried with authts/oidc-client-ts ?

oidc-client has been archived, so there is no reason to support older version. And, also make some repro using Stackblitz or reproducible code repo on github