GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Uncaught Error: Can't resolve all parameters for e: (?) · Issue #2770 · angular-fullstack/generator-angular-fullstack

This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

Uncaught Error: Can't resolve all parameters for e: (?) #2770

Copy link
Copy link
Open
#2771
Open
Uncaught Error: Can't resolve all parameters for e: (?)#2770
#2771
Copy link
Labels
bug

Description

@LuisFlip
LuisFlip
opened on Oct 24, 2018
Issue body actions
  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 5.0.0 RC4
Node 8.12.0
npm 6.4.1
Operating System Windows 10
Item Answer
Transpiler TypeScript
Markup HTML
CSS SCSS
Client Tests Mocha
DB MongoDB
Auth Y

After create project using the generator, i built it in production environment and when i load the app the follow error appears.

image

Activity

  1. LuisFlip commented on Oct 25, 2018

    @LuisFlip
    LuisFlip
    on Oct 25, 2018
    Author
    More actions

    i run:
    gulp build
    in file dist/server/index.js change development to production:
    --> var env = process.env.NODE_ENV = process.env.NODE_ENV || 'production';
    cd dist
    node server/index.js
    next open localhost:8080
    and get the error

  2. Awk34
    added
    bug
    on Oct 25, 2018
  3. Awk34 commented on Oct 25, 2018

    @Awk34
    Awk34
    on Oct 25, 2018
    Collaborator
    More actions

    I was able to reproduce and fix this locally. Apparently it's an issue with webpack bundling.

    Manually add the following to the top of your polyfills.ts file:

    import 'reflect-metadata';
    Reacted by João Marcos Duarte, Sina Aghajani, Syed Muhammad Taha, Bart, Ray Oleaga and Aviw
    Reacted by João Marcos Duarte and Syed Muhammad Taha
    Reacted by Aviw
  4. Awk34
    added a commit that references this issue on Oct 25, 2018

    fix(polyfills): manually import `reflect-metadata`

    This issue will close once commit 550b6f0 is merged into the 'master' branch.
    550b6f0
  5. Awk34
    closed this as completedin #2771on Oct 25, 2018
  6. Awk34 commented on Oct 25, 2018

    @Awk34
    Awk34
    on Oct 25, 2018
    Collaborator
    More actions

    See NativeScript/nativescript-angular#1540 about the same issue

  7. LuisFlip commented on Oct 26, 2018

    @LuisFlip
    LuisFlip
    on Oct 26, 2018
    Author
    More actions

    i try the following:

    import 'reflect-metadata';
    // import 'core-js/es6';
    // import 'core-js/es7/reflect';
    import 'zone.js/dist/zone';

    or

    import 'reflect-metadata';
    // import 'core-js/es6';
    // import 'core-js/es7/reflect';
    //import 'zone.js/dist/zone';

    and other variants allways with reflect-metadata uncommented and the problem persists.

    i don't have the nativescript-angular in my project.
    Ther project is new and i dont have add any line of code.

    other question, is this building in jit or aot?
    if is in jit, how i build project with AOT?

    Thanks

  8. Awk34
    reopened this on Oct 29, 2018
  9. Awk34 commented on Oct 29, 2018

    @Awk34
    Awk34
    on Oct 29, 2018
    Collaborator
    More actions

    It has nothing to do with that project; they just had a similar issue.

    I was able to reproduce this, but adding the reflect-metadata import fixed the issue for me. Can you provide some more details about your case? Perhaps replace these lines: https://github.com/angular-fullstack/generator-angular-fullstack/blob/master/templates/app/webpack.make.js#L29-L31 with this:

    config.mode = 'development';

    and try building again, so we can see the un-minified error.

  10. LuisFlip commented on Oct 30, 2018

    @LuisFlip
    LuisFlip
    on Oct 30, 2018
    Author
    More actions

    Replacing that lines fixed the issue.

    Before the change, the dist/client files created by build have the following sizes:
    image
    After that replace, the build lines
    image

    why we a have three warnings because of the size (1.3~mb) and after the changes we got higher values but not showing any warning?

    is this in AOT or JIT?

    best regards and thanks

  11. Awk34 commented on Nov 2, 2018

    @Awk34
    Awk34
    on Nov 2, 2018
    Collaborator
    More actions

    That change isn't meant to fix the issue, just turn off minification so that we can debug the error better, but if the error goes away when you set Webpack to development mode, then it has to have something to do with minification for builds.

  12. koraysels commented on Nov 6, 2018

    @koraysels
    koraysels
    on Nov 6, 2018
    More actions

    yeah the error ahs something to do with the reflect polyfill.. I have the same issue.
    It Seems he cannot bootstrap the application correctly! If you set the buidlmode to development it will work and no error will be displayed. so we cannot debug it that way :( i can;t not have minified code in prodcution!

  13. koraysels commented on Nov 9, 2018

    @koraysels
    koraysels
    on Nov 9, 2018
    More actions

    This is a problem with UglifyJs. If you set the webpack mode to 'production' it enabels UglifyJsPlugin and then it fails.. I tried differetn options for the UglifyJsPlugin but I cannot get it to work. I think the dependency injection breaks when minification is applied. Do we need some kind of annotation plugin ?

  14. Sina7312 commented on Nov 21, 2018

    @Sina7312
    Sina7312
    on Nov 21, 2018
    More actions

    I did this at top of my app.ts file, and it solve the problem:
    (commented out polyfills import, and add imports for reflect and zone.js)

    import 'reflect-metadata';
    import 'zone.js/dist/zone';
    // import './polyfills';
    
  15. LuisFlip commented on Dec 20, 2018

    @LuisFlip
    LuisFlip
    on Dec 20, 2018
    Author
    More actions

    @Awk34 I solve the problem adding reflect-metadata on top of app.ts
    app.ts:

    import 'reflect-metadata';
    import 'zone.js/dist/zone';
    //import './polyfills';
    
  16. LuisFlip commented on Dec 20, 2018

    @LuisFlip
    LuisFlip
    on Dec 20, 2018
    Author
    More actions

    @koraysels I replace the uglify-js to terser.
    mishoo/UglifyJS#659 (comment)
    if you want continues using the uglify-js you need install UglifyJS2#harmony-v2.8.22. see: https://github.com/webpack-contrib/uglifyjs-webpack-plugin/tree/version-0.4#install

  17. tschaffter commented on Apr 3, 2019

    @tschaffter
    tschaffter
    on Apr 3, 2019
    More actions

    Moving the imports from polyfills.ts to app.ts solves the issue as suggested here by @LuisFlip.

    The Uglifier is not the issue (the issue is still there when commenting it in webpack.make.js).

    Solution

    In webpack.make.js, declare polyfills before app in config.entry.

    Before:

        if (!TEST) {
            config.entry = {
                app: './client/app/app.ts',
                polyfills: './client/app/polyfills.ts',
                vendor: [
                    'lodash'
                ]
            };
        }
    

    Now:

        if (!TEST) {
            config.entry = {
                polyfills: './client/app/polyfills.ts',
                vendor: [
                    'lodash'
                ],
                app: './client/app/app.ts'
            };
        }
    

    Here is what I have included at the top of ./poyfills.ts:

    // Enable certain polyfills depending on which browsers you need to support
    import 'core-js/es6';
    import 'core-js/es7/reflect';
    import 'zone.js/dist/zone';
    
  18. atxiaoxian commented on Apr 17, 2019

    @atxiaoxian
    atxiaoxian
    on Apr 17, 2019
    More actions

    @tschaffter it solved the problem for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.