0

why its showing below like in console.

am trying to do like this

ERROR in Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
    at Object.resolveEntryModuleFromMain (D:\Users\cli-quickstart\cli-quickstart\node_modules\@ngtools\webpack\src\entry_resolver.js:131:11)
    at Promise.resolve.then.then (D:\Users\cli-quickstart\cli-quickstart\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:238:54)                                                                                                                              at process._tickCallback (internal/process/next_tick.js:103:7)

webpack: Failed to compile.

actually am copy and pasting that plunker example in already exist project.

thanks in advance

2
  • you need to provide minimal reproducible example here Commented Jan 30, 2018 at 9:15
  • also am getting Error loading https://unpkg.com/rxjs/operators/refCount.js as "./refCount" from https://unpkg.com/rxjs/operators/share.js in plunkr Commented Jan 30, 2018 at 9:16

2 Answers 2

1

Assuming you made the app using Angular CLI, you should import bootstrap in your package.json. The package looks like this:

"bootstrap": "^3.3.7"

Then after the npm install you want to include it in the styles section of angular-cli.json:

"styles": [
    "styles.css",
    "../node_modules/bootstrap/dist/css/bootstrap.min.css"
  ]

Then it should see your bootstrap code.

Sign up to request clarification or add additional context in comments.

Comments

0

As the error states: pass in an entryModule to the plugins options. As in plunker you got to bootstrap your main module in main.ts as follows

//main entry point
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './app.module';

setTimeout(() => 
  platformBrowserDynamic().bootstrapModule(AppModule)
, 2000);

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.