Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Antoine Gaillard
    @AntoineGaillard_gitlab
    @SanderElias thanks for reaching back ! i didn't touch any of the scully files after running ng add @scullyio/init. Here is the tsconfig file :
    
    {
      "compileOnSave": false,
      "compilerOptions": {
        "esModuleInterop": true,
        "importHelpers": false,
        "lib": ["ES2019", "dom"],
        "module": "commonjs",
        "moduleResolution": "node",
        "sourceMap": true,
        "target": "es2018",
        "types": ["node"],
        "skipLibCheck": true,
        "skipDefaultLibCheck": true,
        "typeRoots": ["../node_modules/@types"],
        "allowSyntheticDefaultImports": true
      },
      "exclude": ["./**/*spec.ts"]
    }
    Antoine Gaillard
    @AntoineGaillard_gitlab
    and my package.json :
    {
      "name": "le-dernier-blog",
      "version": "0.0.0",
      "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e",
        "scully": "scully",
        "scully:serve": "scully serve"
      },
      "private": true,
      "dependencies": {
        "@angular/animations": "~10.2.4",
        "@angular/common": "~10.2.4",
        "@angular/compiler": "~10.2.4",
        "@angular/core": "~10.2.4",
        "@angular/forms": "~10.2.4",
        "@angular/platform-browser": "~10.2.4",
        "@angular/platform-browser-dynamic": "~10.2.4",
        "@angular/router": "~10.2.4",
        "@scullyio/init": "^1.0.1",
        "@scullyio/ng-lib": "^1.0.0",
        "@scullyio/scully": "^1.0.0",
        "rxjs": "~6.6.0",
        "tslib": "^2.0.0",
        "zone.js": "~0.10.2"
      },
      "devDependencies": {
        "@angular-devkit/build-angular": "~0.1002.1",
        "@angular/cli": "~10.2.1",
        "@angular/compiler-cli": "~10.2.4",
        "@types/node": "^12.11.1",
        "@types/jasmine": "~3.5.0",
        "@types/jasminewd2": "~2.0.3",
        "codelyzer": "^6.0.0",
        "jasmine-core": "~3.6.0",
        "jasmine-spec-reporter": "~5.0.0",
        "karma": "~5.0.0",
        "karma-chrome-launcher": "~3.1.0",
        "karma-coverage-istanbul-reporter": "~3.0.2",
        "karma-jasmine": "~4.0.0",
        "karma-jasmine-html-reporter": "^1.5.0",
        "protractor": "~7.0.0",
        "ts-node": "~8.3.0",
        "tslint": "~6.1.0",
        "typescript": "~4.0.2"
      }
    }
    PRR24
    @PRR24
    with hacking around it seems that Scully service has hung in an invalid state as changing config file has no effect. On running it states that Background servers already running. Sadly the old suggestion of executng npx scully killServer seem to have no effect. What is the correct way to kill Scully background service?
    Sander Elias
    @SanderElias
    npx scully killServer
    Or killing all background node tasks in the task manager.
    PRR24
    @PRR24
    killServer did not work, had to killall node. thanks anyway.
    Sander Elias
    @SanderElias
    for me a pkill node usually takes care of it, but I only rarely have this happening anymore. We fixed quite a couple of issues that can cause it, and as far as I know, it doesn't happen anymore.
    In the past I had a system that would hang any background task occasionally. it had faulty ram, took me a year to figure out the cause.
    (not saying that's your issue! )
    @esdegan50000 scullyio/scully#1200
    once that's merged, I'll release an update that fixes the backtick issue.
    Antoine Gaillard
    @AntoineGaillard_gitlab
    is there a recommanded version of Angular for best compatibility ? I don't have any other clue at what could be the source of my problem, since this is a fresh project :(
    PRR24
    @PRR24
    I created my first test on 10.2 as this is what Scully package.json defines
    Sander Elias
    @SanderElias
    @AntoineGaillard_gitlab No there is no need for another angular version.
    There are some strange things in windows tho.
    1. don't use powershell.
    2. don't have mixed case paths
    3. don't have spaces in your path(any platform)
    If you make your app available to me, I can take a look, there is probably something simple causing this.
    (BTW, the above points are weaknesses in OS and 3rtp party libraries we don't have control over!)
    Antoine Gaillard
    @AntoineGaillard_gitlab
    thanks, it's on a private repo on Gitlab, I can invite you there :)
    (I tried with Angular 9 BTW, and indeed it get the same error... I'm on Windows, using Cmder and VSCode, and for now just one path : 'hein' ^^)
    Sander Elias
    @SanderElias
    Send me an invite. I just did build an new project using Scully without an issue.
    Antoine Gaillard
    @AntoineGaillard_gitlab
    i invited you on my Gitlab repo :)
    Sander Elias
    @SanderElias
    @AntoineGaillard_gitlab i seems my mouse just died... I'll fix that and take a look.
    Antoine Gaillard
    @AntoineGaillard_gitlab
    ^^' no problem !
    Sander Elias
    @SanderElias
    I can do most without the darn thing, but web-pages aren't that accessible ;)
    Brad
    @sonicparke_twitter

    Ok, you can ignore routes in your config, they will not be generated then.

    `/someRoute`:{type:'ignored'}

    @fireflysemantics This might be your answer

    Marcus Feitoza
    @mfeitoza
    Hi everyone! I'm get some issue with Scully... I have a Page that fetch data from server, in the build process the html is fine and with content inside html, but when a launch Scully serve the page still fetching data from the server. Someone can help with this issue?
    Sander Elias
    @SanderElias
    @mfeitoza can you show the code you use to fetch the data? (and how you are using transferState to embed?)
    Davide Diaconu
    @davide.diaconu_gitlab
    Hello everyone, i was wondering: can I build my angular app in hybrid way? i.e. some routes statically and some routes as CSR?
    e.g. i have a dynamic route /route/:uuid that for some reason i cant provide all uuid to scully: can i let that route be handled the "default angulay way" ?
    Sander Elias
    @SanderElias
    @davide.diaconu_gitlab That is the default way Scully handles things.
    Davide Diaconu
    @davide.diaconu_gitlab
    @SanderElias but if i refresh on one of those pages i get "cannot get /route/123"
    Marcus Feitoza
    @mfeitoza
    @SanderElias
    Yes
    // faq.service.ts
      getPlansFaq() {
        return this.apiService.get('/texts', { group: 'plans_faq' })
          .pipe(map(res => {
            let faqs = res.map(faq => new Faq(faq))
            return faqs
          }))
      }
    
    // plans.component.ts
    export class PlansComponent implements OnInit {
      faq: Faq[] = []
      constructor(private faqService: FaqService) { }
    
      ngOnInit(): void {
        this.faqService.getPlansFaq().subscribe(res => {
          this.faq = res
        })
      }
    
    }
    Dmitriy Danilov
    @daniloff200
    @davide.diaconu_gitlab I have the same problem right now, and want to exclude some routes :) If I use "ignored plugin", I had the same error, or
    404 - URL not provided in the app Scully is serving
    The url "/route/abc" is not provided in the scully.routes.json, so it can't be generated
    Sander Elias
    @SanderElias
    @daniloff200 An ignored route is not going to be generated. You need to set up your server to host the 404.html (your original unaltered app) on pages not found.
    the Scully server can mimic this behavior, by setting the 404 option. (https://scully.io/docs/Reference/config/#handle404)
    Dmitriy Danilov
    @daniloff200

    hi @SanderElias! Thanks for your reply. Oh, that's, maybe, was a small misunderstanding of my case.

    So yeah, let me share some more details. I have "/account" route, which also has some childroutes, see below

    {
            path: 'profile',
            loadChildren: () =>
              import('./+profile/profile.module').then(m => m.ProfileModule)
          },
          {
            path: 'password',
            loadChildren: () =>
              import('./+password/password.module').then(m => m.PasswordModule)
          },
          {
            path: 'address',
            loadChildren: () =>
              import('./+address/address.module').then(m => m.AddressModule)
          },

    They exist in the app, and I want to exclude them from prerendering, and use them in the app without SSR. But, still got error, like

    Can't get /account/profile

    Thing, you mentioned, about handle404 helped with error 404 - URL not provided in the app Scully is serving

    Sander Elias
    @SanderElias
    set up your server to handle 404, so it serves the /404.html on 404's. That is how static websites work.
    Its a setting in your hosting, not something Scully can take care of.
    Rolf Bäck
    @rolfback

    Hi, I have a pretty large Angular 11 project with many lazy-loaded modules and many of them are sharing some of them. But there are no circular referenced modules.

    When I run Scully I get errors (from —showGuessError) that says the route-modules belongs to many modules but that’s not true. The modules normally have one unique routing-module and they do not have the same names. There is no other error messages anywhere and the site works as it should wo. Scully. Any ideas for a direction I should go?

    Pierre-Edouard Galtier
    @pegaltier
    Rolf you can check your typescript alias path and eventually modify your barrel import to point directly the scully module.
    Hello I have joined a big company recently and we start the year with a hackathon, i'm working on a POC with Scully to show them the potential of pre-rendering. @SanderElias do you think Scully it's suitable for a large app with more than 10 000 products pages multiplied by 4 languages so 40 000 pages? and actually it can grow to more...
    Sander Elias
    @SanderElias
    @rolfback This is something that does happen with the guess-parser. You can use the guess-options in the config to exclude the duplicates. (well, guess thinks it has duplicated things). I haven't yet seen a place where this cause any problem. Its a bit of a pain. use the --showGuessError option and you can see the module names in question, add them to the list, and off you go.
    @pegaltier 40.000 pages is going to be taxing on the server that needs to generate the stuff. There are things we can do to ease the pain, and most of them are planned in the future.
    Nevertheless, Scully is a good option here.
    Also, your company can hire mine, to speed up the process. ;)
    Pierre-Edouard Galtier
    @pegaltier
    @SanderElias Thank you yes if the POC i work on is good enough we will continue towards this direction and thus i will be glad if you participate! Let's talk in PM about this and my current POC.
    Firefly Semantics Corporation
    @fireflysemantics
    Scully strips web components from generated content. I've created an issue for it and asked about it here: https://stackoverflow.com/questions/65744660/using-web-components-with-scully
    Anyone know how to solve it?
    Sander Elias
    @SanderElias
    @fireflysemantics Scully doesn't strip away any element. It does take the exect output of your application, and processes that into static files,
    compile your application, run npx scully serve and visit your unmodified app on http://localhost:1864. Is the element in there?
    Thisaru Mahadurage
    @thisarumahadurage
    Hi, I'm testing Sully and I wanted to test out how it handles HttpClient requests. Even after prerendering, I'm still seeing calls to the API. Can you explain what's going on there? Is it the expected behavior? How can I stop the app from calling the API and use the already available content from the HTML? Thanks.
    Sander Elias
    @SanderElias
    @thisarumahadurage If you didn't change a thing to your app, that is expected.
    if you want to embed the data from your API's into the static files, you need to use the transferState service