maciejtreder / ng-toolkit

:star: Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
https://www.angular-universal-pwa.maciejtreder.com
MIT License
1.12k stars 156 forks source link

Bug when trying to access localhost:8080 after npm run server [NotYetImplemented] #491

Open GZM047 opened 6 years ago

GZM047 commented 6 years ago

I'm submitting a...


[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[x] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

ng serve - works npm run build:prod - works npm run server - works accessing website on localhost:8080 - doesn't work

Expected behavior

ng serve - works npm run build:prod - works npm run server - works accessing website on localhost:8080 should work if all the above have built successfully

Minimal reproduction of the problem with instructions

ng serve npm run build:prod npm run server access website on localhost:8080

Environment


Angular version: 7.0.1
Angular CLI version: 7.0.3


- Node version: 8.9.4  
- Platform:  Win32 x64

**THE ERROR IS THE FOLLOWING:

Listening on: http://localhost:8080
ERROR Error: NotYetImplemented
    at Document.module.exports.exports.nyi (C:\Lab\daniels-seo\dist\server.js:59079:9)
    at CookieService.module.exports.CookieService.check (C:\Lab\daniels-seo\dist\server.js:104023:48)
    at CookieService.module.exports.CookieService.get (C:\Lab\daniels-seo\dist\server.js:104031:47)
    at new AppComponent (C:\Lab\daniels-seo\dist\server.js:141367:41)
    at createClass (C:\Lab\daniels-seo\dist\server.js:45823:20)
    at createDirectiveInstance (C:\Lab\daniels-seo\dist\server.js:45698:20)
    at createViewNodes (C:\Lab\daniels-seo\dist\server.js:46924:36)
    at createRootView (C:\Lab\daniels-seo\dist\server.js:46838:5)
    at Object.createProdRootView [as createRootView] (C:\Lab\daniels-seo\dist\server.js:47350:12)
    at ComponentFactory_.module.exports.ComponentFactory_.create (C:\Lab\daniels-seo\dist\server.js:45177:29)**

![capture](https://user-images.githubusercontent.com/44571907/47646231-89895180-db73-11e8-973c-7231211018d6.JPG)            
Jucuzzi commented 5 years ago

I meet the same problem ! how to resolve this?

kunalair commented 5 years ago

@maciejtreder Got a similar issue during build:prerender. Seems like issue with document.cookie ? Kinda stuck here.

ERROR Error: NotYetImplemented
    at Document.module.exports.exports.nyi (/Users/kunalmz/Desktop/Repos/content-publisher-new/content-publisher/dist/prerender.js:94715:9)
    at UserdataService.module.exports.UserdataService.getCookie (/Users/kunalmz/Desktop/Repos/content-publisher-new/content-publisher/dist/prerender.js:159286:27)
    at new UserdataService (/Users/kunalmz/Desktop/Repos/content-publisher-new/content-publisher/dist/prerender.js:159067:94)

Here getCookie method is trying to perform some cookie based operation.