-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of undefined (reading 'setAttribute') #135
Comments
i get a similar one with angular 16. and yes, only on
|
I'm facing the same issue in Next.js 13 and |
same here in vite |
same here. Angular 17. |
Same here with Angular 17 |
In Angular 16, during a build (ng build), there is an unhandled error within critters.js:519:30
Here is the code snippet within critters.js:
if (!crittersContainer) {
document.documentElement.setAttribute('data-critters-container', '');
crittersContainer = document.documentElement;
}
Here is the error message:
[error] TypeError: Cannot read properties of undefined (reading 'setAttribute')
at createDocument (C:\Development\sourcecode\sequoia\node_modules\critters\dist\critters.js:519:30)
at CrittersExtended.process (C:\Development\sourcecode\sequoia\node_modules\critters\dist\critters.js:1123:22)
at InlineCriticalCssProcessor.process (C:\Development\sourcecode\sequoia\node_modules@angular-devkit\build-angular\src\utils\index-file\inline-critical-css.js:167:40)
at C:\Development\sourcecode\sequoia\node_modules@angular-devkit\build-angular\src\utils\index-file\index-html-generator.js:123:64
at IndexHtmlGenerator.process (C:\Development\sourcecode\sequoia\node_modules@angular-devkit\build-angular\src\utils\index-file\index-html-generator.js:65:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async execute (C:\Development\sourcecode\sequoia\node_modules@angular-devkit\build-angular\src\builders\browser-esbuild\index.js:107:47)
at async withSpinner (C:\Development\sourcecode\sequoia\node_modules@angular-devkit\build-angular\src\tools\esbuild\utils.js:73:16)
at async buildEsbuildBrowserInternal (C:\Development\sourcecode\sequoia\node_modules@angular-devkit\build-angular\src\builders\browser-esbuild\index.js:207:18)
at async handleAsyncIterator (C:\Development\sourcecode\sequoia\node_modules@angular-devkit\architect\src\api.js:35:28)
As a consequence, the index.html cannot be built within the Angular project. (Index html generation failed.)
The text was updated successfully, but these errors were encountered: