Error: Can't resolve all parameters for ApplicationModule: (?)












5















I want to create Angular application without CLI.
After that I get an error:



Error: Can't resolve all parameters for ApplicationModule: (?).



Project contains couple files, main of this is:



• main.ts



import 'zone.js/dist/zone'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './modules/app.module';

platformBrowserDynamic().bootstrapModule(AppModule)


• component.ts



import { Component } from '@angular/core';

@Component({
selector: 'app-root',
template: `Hello World`
})
export class AppComponent {}


• module.ts



import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from "../components/app.component";

@NgModule({
imports: [
BrowserModule,
],
declarations: [
AppComponent
],
bootstrap: [
AppComponent
]
})
export class AppModule {}


I search on StackOverflow before, but I can't found solution.
Similar error occur when someone wants to inject service without @Injectable decorator. In my case I don't have any service, so that am afraid nobody has the same error.



Angular CLI is so simple to start project, but only when you want setup project without generator, you know what parts are necessary to create during bootstrap application.










share|improve this question





























    5















    I want to create Angular application without CLI.
    After that I get an error:



    Error: Can't resolve all parameters for ApplicationModule: (?).



    Project contains couple files, main of this is:



    • main.ts



    import 'zone.js/dist/zone'
    import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
    import { AppModule } from './modules/app.module';

    platformBrowserDynamic().bootstrapModule(AppModule)


    • component.ts



    import { Component } from '@angular/core';

    @Component({
    selector: 'app-root',
    template: `Hello World`
    })
    export class AppComponent {}


    • module.ts



    import { NgModule } from "@angular/core";
    import { BrowserModule } from "@angular/platform-browser";
    import { AppComponent } from "../components/app.component";

    @NgModule({
    imports: [
    BrowserModule,
    ],
    declarations: [
    AppComponent
    ],
    bootstrap: [
    AppComponent
    ]
    })
    export class AppModule {}


    I search on StackOverflow before, but I can't found solution.
    Similar error occur when someone wants to inject service without @Injectable decorator. In my case I don't have any service, so that am afraid nobody has the same error.



    Angular CLI is so simple to start project, but only when you want setup project without generator, you know what parts are necessary to create during bootstrap application.










    share|improve this question



























      5












      5








      5


      1






      I want to create Angular application without CLI.
      After that I get an error:



      Error: Can't resolve all parameters for ApplicationModule: (?).



      Project contains couple files, main of this is:



      • main.ts



      import 'zone.js/dist/zone'
      import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
      import { AppModule } from './modules/app.module';

      platformBrowserDynamic().bootstrapModule(AppModule)


      • component.ts



      import { Component } from '@angular/core';

      @Component({
      selector: 'app-root',
      template: `Hello World`
      })
      export class AppComponent {}


      • module.ts



      import { NgModule } from "@angular/core";
      import { BrowserModule } from "@angular/platform-browser";
      import { AppComponent } from "../components/app.component";

      @NgModule({
      imports: [
      BrowserModule,
      ],
      declarations: [
      AppComponent
      ],
      bootstrap: [
      AppComponent
      ]
      })
      export class AppModule {}


      I search on StackOverflow before, but I can't found solution.
      Similar error occur when someone wants to inject service without @Injectable decorator. In my case I don't have any service, so that am afraid nobody has the same error.



      Angular CLI is so simple to start project, but only when you want setup project without generator, you know what parts are necessary to create during bootstrap application.










      share|improve this question
















      I want to create Angular application without CLI.
      After that I get an error:



      Error: Can't resolve all parameters for ApplicationModule: (?).



      Project contains couple files, main of this is:



      • main.ts



      import 'zone.js/dist/zone'
      import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
      import { AppModule } from './modules/app.module';

      platformBrowserDynamic().bootstrapModule(AppModule)


      • component.ts



      import { Component } from '@angular/core';

      @Component({
      selector: 'app-root',
      template: `Hello World`
      })
      export class AppComponent {}


      • module.ts



      import { NgModule } from "@angular/core";
      import { BrowserModule } from "@angular/platform-browser";
      import { AppComponent } from "../components/app.component";

      @NgModule({
      imports: [
      BrowserModule,
      ],
      declarations: [
      AppComponent
      ],
      bootstrap: [
      AppComponent
      ]
      })
      export class AppModule {}


      I search on StackOverflow before, but I can't found solution.
      Similar error occur when someone wants to inject service without @Injectable decorator. In my case I don't have any service, so that am afraid nobody has the same error.



      Angular CLI is so simple to start project, but only when you want setup project without generator, you know what parts are necessary to create during bootstrap application.







      angular reflect






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 16:16







      piecioshka

















      asked Nov 22 '18 at 16:06









      piecioshkapiecioshka

      865714




      865714
























          1 Answer
          1






          active

          oldest

          votes


















          4
















          1. Install core-js by command:



            npm i core-js



          2. Add in main.ts file:



            import 'core-js/es6/reflect';
            import 'core-js/es7/reflect';



          Btw. I'm spent whole day to resolve this.






          share|improve this answer
























          • can you provide full code for example publish on github? i am trying to archive same test app and get same error

            – devi
            Nov 29 '18 at 14:19











          • You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

            – piecioshka
            Dec 3 '18 at 22:38











          • can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

            – devi
            Dec 4 '18 at 20:15













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434713%2ferror-cant-resolve-all-parameters-for-applicationmodule%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4
















          1. Install core-js by command:



            npm i core-js



          2. Add in main.ts file:



            import 'core-js/es6/reflect';
            import 'core-js/es7/reflect';



          Btw. I'm spent whole day to resolve this.






          share|improve this answer
























          • can you provide full code for example publish on github? i am trying to archive same test app and get same error

            – devi
            Nov 29 '18 at 14:19











          • You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

            – piecioshka
            Dec 3 '18 at 22:38











          • can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

            – devi
            Dec 4 '18 at 20:15


















          4
















          1. Install core-js by command:



            npm i core-js



          2. Add in main.ts file:



            import 'core-js/es6/reflect';
            import 'core-js/es7/reflect';



          Btw. I'm spent whole day to resolve this.






          share|improve this answer
























          • can you provide full code for example publish on github? i am trying to archive same test app and get same error

            – devi
            Nov 29 '18 at 14:19











          • You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

            – piecioshka
            Dec 3 '18 at 22:38











          • can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

            – devi
            Dec 4 '18 at 20:15
















          4












          4








          4









          1. Install core-js by command:



            npm i core-js



          2. Add in main.ts file:



            import 'core-js/es6/reflect';
            import 'core-js/es7/reflect';



          Btw. I'm spent whole day to resolve this.






          share|improve this answer















          1. Install core-js by command:



            npm i core-js



          2. Add in main.ts file:



            import 'core-js/es6/reflect';
            import 'core-js/es7/reflect';



          Btw. I'm spent whole day to resolve this.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 16:06









          piecioshkapiecioshka

          865714




          865714













          • can you provide full code for example publish on github? i am trying to archive same test app and get same error

            – devi
            Nov 29 '18 at 14:19











          • You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

            – piecioshka
            Dec 3 '18 at 22:38











          • can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

            – devi
            Dec 4 '18 at 20:15





















          • can you provide full code for example publish on github? i am trying to archive same test app and get same error

            – devi
            Nov 29 '18 at 14:19











          • You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

            – piecioshka
            Dec 3 '18 at 22:38











          • can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

            – devi
            Dec 4 '18 at 20:15



















          can you provide full code for example publish on github? i am trying to archive same test app and get same error

          – devi
          Nov 29 '18 at 14:19





          can you provide full code for example publish on github? i am trying to archive same test app and get same error

          – devi
          Nov 29 '18 at 14:19













          You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

          – piecioshka
          Dec 3 '18 at 22:38





          You can do it, when remove core-js dependency. Currently my project is grown and I cannot published it.

          – piecioshka
          Dec 3 '18 at 22:38













          can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

          – devi
          Dec 4 '18 at 20:15







          can you look at this github.com/gdbd/Angular_no_cli ? the code is almost same but i get error "Can't resolve all parameters for ApplicationModule: (?)."

          – devi
          Dec 4 '18 at 20:15




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434713%2ferror-cant-resolve-all-parameters-for-applicationmodule%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen