Closed sefatanam closed 3 months ago
Checkout my practice repository link, here you can directly reproduce the error, https://github.com/sefatanam/ng-nx-ssr-spartan-ui
I noticed this too. I think this is actually coming from the combobox component of the Angular CDK. We should probably open an issue upstream
This should be fixed by https://github.com/angular/components/pull/28746. It is not released yet, maybe it will be included in a 17.3.x bugfix release.
This should be fixed by https://github.com/angular/components/pull/28746. It is not released yet, maybe it will be included in a 17.3.x bugfix release.
Got it, Thanks ✨
Fix landed in @angular/cdk@17.3.2
I've tested the select component with the latest update of angular-cdk
, and it appears that the previous error no longer occurs. I updated my package.json
file using nx migrate latest
,
{
"name": "@NAME/source",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start": "nx serve",
"build": "nx build",
"test": "nx test"
},
"private": true,
"dependencies": {
"@angular/animations": "17.3.4",
"@angular/cdk": "17.3.4",
"@angular/common": "17.3.4",
"@angular/compiler": "17.3.4",
"@angular/core": "17.3.4",
"@angular/forms": "17.3.4",
"@angular/platform-browser": "17.3.4",
"@angular/platform-browser-dynamic": "17.3.4",
"@angular/platform-server": "17.3.4",
"@angular/router": "17.3.4",
"@angular/ssr": "17.3.4",
"@ng-icons/core": "^25.1.0",
"@ng-icons/lucide": "^26.3.0",
"@nx/angular": "18.2.4",
"@spartan-ng/ui-accordion-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-alertdialog-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-avatar-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-checkbox-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-collapsible-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-command-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-core": "0.0.1-alpha.337",
"@spartan-ng/ui-dialog-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-hovercard-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-label-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-menu-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-popover-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-progress-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-radiogroup-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-select-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-separator-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-sheet-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-switch-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-table-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-tabs-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-toggle-brain": "0.0.1-alpha.337",
"@spartan-ng/ui-tooltip-brain": "0.0.1-alpha.337",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
"embla-carousel-angular": "^14.0.0",
"express": "~4.18.2",
"ngx-scrollbar": "^13.0.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.3.4",
"@angular-devkit/core": "17.3.4",
"@angular-devkit/schematics": "17.3.4",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~17.3.0",
"@angular/compiler-cli": "17.3.4",
"@angular/language-service": "17.3.4",
"@nx/cypress": "18.2.4",
"@nx/eslint": "18.2.4",
"@nx/eslint-plugin": "18.2.4",
"@nx/jest": "18.2.4",
"@nx/js": "18.2.4",
"@nx/web": "18.2.4",
"@nx/workspace": "18.2.4",
"@schematics/angular": "17.3.4",
"@spartan-ng/cli": "0.0.1-alpha.342",
"@swc-node/register": "~1.8.0",
"@swc/core": "~1.3.85",
"@swc/helpers": "~0.5.2",
"@types/express": "4.17.14",
"@types/jest": "^29.4.0",
"@types/node": "18.16.9",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"autoprefixer": "^10.4.0",
"cypress": "^13.6.6",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-cypress": "^2.13.4",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jest-preset-angular": "~14.0.3",
"jsonc-eslint-parser": "^2.1.0",
"ng-packagr": "17.3.0",
"nx": "18.2.4",
"postcss": "^8.4.5",
"postcss-url": "~10.1.3",
"prettier": "^2.6.2",
"tailwind-merge": "^2.2.0",
"tailwindcss": "^3.0.2",
"tailwindcss-animate": "^1.0.6",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"typescript": "5.4.5"
},
"nx": {
"includedScripts": []
}
}
Closing this issue Thanks
Here is the environment detail,
package.json
pnpm
- 8.15.2node
20.9.0Which area/package is the issue in?
select
Description
I followed the official tutorial for the select component. However, whenever I use it in my app, which is the latest version of Angular (17.2.0) with server-side rendering, it shows me an ERROR ReferenceError: window is not defined in my terminal. However, other components such as ContextMenu, Table, Accordion, etc., are working fine.
ERROR
Other information
I practice with nx-workspace, First I generated a angular standalone app with SSR enabled then add spartan ui on it .
I would be willing to submit a PR to fix this issue