Open albij-jr opened 3 years ago
Hi, could you describe the problem in detail and provide a step-by-step description to reproduce it?
first i installed ckeditor package in angular project the installed angular universal of the following version "@ckeditor/ckeditor5-angular": "^2.0.1", "@ckeditor/ckeditor5-build-classic": "^23.1.0", and when i try to build ssr build i get the following error. The package seems incompatible with ssr.
I had the same issue, Then I added a few updates to the server.ts file as below
`const domino = require('domino'); const fs = require('fs'); const template = fs.readFileSync('dist/aprayzWeb/browser/index.html').toString(); const win = domino.createWindow(template);
global['window'] = win; global['document'] = win.document; global['DOMTokenList'] = win.DOMTokenList; global['Node'] = win.Node; global['Text'] = win.Text; global['HTMLElement'] = win.HTMLElement; global['navigator'] = win.navigator;`
Now the 'window is not defined' issue is cleared instead of that it's showing:
TypeError: Cannot set property 'ckeFiller' of undefined
Any solution for this?
This works for me!!! @albij-jr Please check this comment https://github.com/ckeditor/ckeditor5-angular/issues/99#issuecomment-578936859
Hi @Syamhere!
As it's hardly discoverable I'll rename this issue to make sure that it can be found in our dcs.
ReferenceError: window is not defined at Object../node_modules/@ckeditor/ckeditor5-build-classic/build/translations/ar.js (D:\project\angular\project\dist\project\server\main.js:129171:2024) at webpack_require (D:\project\angular\project\dist\project\server\main.js:26:30) at Module../src/app/views/components/modal/add-offer-modal/add-offer-modal.component.ts (D:\project\angular\project\dist\project\server\main.js:405301:113) at webpack_require (D:\project\angular\project\dist\project\server\main.js:26:30) at Module../src/app/app.module.ts (D:\project\angular\project\dist\project\server\main.js:400607:124) at webpack_require (D:\project\angular\project\dist\project\server\main.js:26:30) at Module../src/app/app.server.module.ts (D:\project\angular\project\dist\project\server\main.js:400936:69) at webpack_require (D:\project\angular\project\dist\project\server\main.js:26:30) at Module../src/main.server.ts (D:\project\angular\project\dist\project\server\main.js:411870:80) at __webpack_require__ (D:\project\angular\project\dist\project\server\main.js:26:30)