Аfter compiling the application, I get this error several times enter image description here
text error:
ERROR Error
at XMLHttpRequest.send (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:169324:19)
at Observable.rxjs__WEBPACK_IMPORTED_MODULE_1__.Observable [as _subscribe] (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:19023:17)
at Observable._trySubscribe (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:154852:25)
at Observable.subscribe (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:154838:22)
at DoOperator.call (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:162245:23)
at Observable.subscribe (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:154833:31)
at scheduleTask (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:97108:32)
at Observable.rxjs__WEBPACK_IMPORTED_MODULE_7__.Observable [as _subscribe] (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:97170:13)
at Observable._trySubscribe (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:154852:25)
at Observable.subscribe (C:\Users\seva-\projects\pileuniversal\dist\pileuniversal\server\main.js:154838:22)
I'm not importing anything in app.server.module
after creating ssr
Was problem with localStorage and window with DOM, but solition is exist
I face the very same problem. You may check this article
https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/framework-and-features/ssr-rendering.html
The issue for XMLHttpRequest.send comes from the fact that this "object", does not exist for the Node server.
I advise You to track where Your error comes from. In my case, it was from ngx-translate module, which was trying to get the JSON files via XMLHttpRequest. To solve the issue You have to:
In my case, I follow this tutorial: https://itnext.io/angular-universal-how-to-add-multi-language-support-68d83f6dfc4d
I add the interceptor and solve the issue.
Hope that helps
I Had this problem, and just now I changed the URL for my requests
from
'/assets/data/products.json'
to
'http://localhost...'.
it worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With