Size: a a a

Angular-universal-ru

2020 January 31

ИК

Игорь Кравченко in Angular-universal-ru
Michael Izmaylov
а зачем нужен app-inline-style в стартере?
источник

ВС

Вячеслав Салоид in Angular-universal-ru
Всем привет

Подскажите, что используете для авторизации с Angular Universal?

@auth0/angular-jwt и отключаете localStorage?
или ngx-auth?
или есть вариант получше?

Может быть тупой вопрос - первый раз настраиваю Universal
источник

VB

Vlad Bespalov in Angular-universal-ru
привет
источник

VB

Vlad Bespalov in Angular-universal-ru
@ngx-utils/cookies
источник

VB

Vlad Bespalov in Angular-universal-ru
я этот использовал вместо localStorage для юниверсала
источник

VB

Vlad Bespalov in Angular-universal-ru
остальная работа с jwt-токенами базовая, любой тутор из гугла поможет
источник
2020 February 01

ВС

Вячеслав Салоид in Angular-universal-ru
Vlad Bespalov
@ngx-utils/cookies
Спасибо. Помогло.

Можете еще подсказать, как связать ngrx с universal

ибо, как я понимаю, на сервера стор при ините не создается и у меня первая страница отдает ошибку, мол не может вытащить поле от undefined
источник
2020 February 03

РА

Руслан Алиев in Angular-universal-ru
#whois
▫️Проект книжный магазин, Stream
▫️Frontend: angular
▫️интересен и полезен: вопросами и ответами
▫️-
▫️СПб
▫️youtube
источник
2020 February 04

KV

Karpov Vladimir in Angular-universal-ru
Парни, привет. при деплои на прод, вылетела ошибка
eb-client | Unhandled Promise rejection: Can't set headers after they are sent. ; Zone: <root> ; Task: Promise.then ; Value: Error: Can't set headers after they are sent.
eb-client |     at validateHeader (_http_outgoing.js:491:11)
eb-client |     at ServerResponse.setHeader (_http_outgoing.js:498:3)
eb-client |     at ServerResponse.header (webpack:///./node_modules/express/lib/response.js?:771:10)
eb-client |     at ServerResponse.send (webpack:///./node_modules/express/lib/response.js?:170:12)
eb-client |     at ServerResponse.res.send (webpack:///./server.ts?:176:13)
eb-client |     at res.render (webpack:///./server.ts?:234:11)
eb-client |     at eval (webpack:///./node_modules/@nguniversal/express-engine/fesm5/express-engine.js?:90:17)
eb-client |     at ZoneDelegate.invoke (webpack:///./node_modules/zone.js/dist/zone-node.js?:390:26)
eb-client |     at Zone.run (webpack:///./node_modules/zone.js/dist/zone-node.js?:149:43)
eb-client |     at eval (webpack:///./node_modules/zone.js/dist/zone-node.js?:888:34) Error: Can't set headers after they are sent.
источник

KV

Karpov Vladimir in Angular-universal-ru
При работе на локалхосте такого не было
источник

KV

Karpov Vladimir in Angular-universal-ru
есть идеи изза чего?
источник

ИК

Игорь Кравченко in Angular-universal-ru
Karpov Vladimir
Парни, привет. при деплои на прод, вылетела ошибка
eb-client | Unhandled Promise rejection: Can't set headers after they are sent. ; Zone: <root> ; Task: Promise.then ; Value: Error: Can't set headers after they are sent.
eb-client |     at validateHeader (_http_outgoing.js:491:11)
eb-client |     at ServerResponse.setHeader (_http_outgoing.js:498:3)
eb-client |     at ServerResponse.header (webpack:///./node_modules/express/lib/response.js?:771:10)
eb-client |     at ServerResponse.send (webpack:///./node_modules/express/lib/response.js?:170:12)
eb-client |     at ServerResponse.res.send (webpack:///./server.ts?:176:13)
eb-client |     at res.render (webpack:///./server.ts?:234:11)
eb-client |     at eval (webpack:///./node_modules/@nguniversal/express-engine/fesm5/express-engine.js?:90:17)
eb-client |     at ZoneDelegate.invoke (webpack:///./node_modules/zone.js/dist/zone-node.js?:390:26)
eb-client |     at Zone.run (webpack:///./node_modules/zone.js/dist/zone-node.js?:149:43)
eb-client |     at eval (webpack:///./node_modules/zone.js/dist/zone-node.js?:888:34) Error: Can't set headers after they are sent.
источник

KV

Karpov Vladimir in Angular-universal-ru
основной посыл  - попробовать поставить другую версию zone.js ?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
Я уже выдыхаюсь. Не работает рендеринг. Локально пытаюсь запустить angular universal. Ни в какую не хочет заводиться.
Единственное сообщение:  Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. Buffer у меня в проекте вообще нет, а localhost бесконечно загружается.
Есть идеи? В какую сторону копать?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
источник

РА

Руслан Алиев in Angular-universal-ru
Руслан Алиев
> client-app@0.0.0 serve:ssr
> node dist/server --trace-warnings --trace-deprecation

Node Express server listening on http://localhost:8081
(node:68775) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Не понимаю в чем проблема. Все ошибки исправил (window, document, location, localStorage....) Сейчас выводит сообщение выше, но я не использую Buffer, а сайт не собирается (Angular Universal)
Есть какое-нибудь предположение в чём может быть причина?
источник