Not able to run angular app due to ɵɵinject & ɵɵdefineInjectable (Getting error at compile time)

Related searches

Get this error after npm install:

+-- UNMET PEER DEPENDENCY @angular/common@6.1.10

+-- UNMET PEER DEPENDENCY @angular/core@6.1.10

`-- file-saver@1.3.8

Get this error after compile:

WARNING in ./node_modules/@agm/core/fesm5/agm-core.js 4538:120-128 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@agm/core/fesm5/agm-core.js 4538:34-52 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

my package.json is:

  "name": "web-app",
  "version": "2.1.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "public": "ng serve --port 8080 --host",
    "build": "ng build --prod --build-optimizer",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor"
  "private": true,
  "dependencies": {
    "@agm/core": "^1.0.0-beta.2",
    "@angular/animations": "^6.1.10",
    "@angular/cdk": "^6.4.7",
    "@angular/common": "^6.1.10",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.10",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/material": "^6.4.7",
    "@angular/material-moment-adapter": "^6.4.2",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "@turf/turf": "latest",
    "@types/file-saver": "^1.3.0",
    "core-js": "^2.5.7",
    "cron": "^1.7.2",
    "enhanced-resolve": "^3.3.0",
    "file-saver": "^1.3.8",
    "hammerjs": "^2.0.8",
    "highcharts": "^6.1.1",
    "lodash": "^4.17.10",
    "moment": "^2.22.2",
    "ngx-clipboard": "^11.1.1",
    "ngx-gauge": "1.0.0-beta.7",
    "progressbar.js": "^1.0.1",
    "rxjs": "6.2.2",
    "rxjs-compat": "6.2.2",
    "screenfull": "^3.3.2",
    "": "^2.1.1",
    "": "^2.1.1",
    "ts-helpers": "^1.1.2",
    "zone.js": "^0.8.26"
  "devDependencies": {
    "@angular/cli": "^1.6.6",
    "@angular/compiler-cli": "^6.1.0",
    "@types/googlemaps": "^3.30.16",
    "@types/highcharts": "^5.0.25",
    "@types/jasmine": "2.8.8",
    "@types/node": "~8.0.0",
    "@types/": "^1.4.36",
    "@types/": "^1.4.32",
    "codelyzer": "^4.4.2",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "2.0.5",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.1.2",
    "karma-remap-istanbul": "^0.6.0",
    "protractor": "~4.0.13",
    "ts-node": "1.2.1",
    "tslint": "^5.10.0",
    "typescript": "2.7.2"
  "browserslist": [
    "last 2 versions",
    "ie 11"

Try removing your node_modules folder, and package-lock.json file, then rerun npm install

Or, run npm i --force, the force flag will force npm to fetch remote resources even if a local copy exists on disk.

And lastly, you can try reinstalling npm:

$ npm i -g npm

Not able to start Angular app with CLI, I want to run the Angular app with angular-cli. As per process, I follow the instruction on the website of CLI. But I got some issue and app does not start. Please� How an Angular's app get loaded and started. When you create an Angular app and run it by using ng serve command, it looks like the following image. It is a simple Angular app created by using ng new app_name command and nothing is edited in the app. The name of the app is angular8firstapp. Now, we will learn how the Angular's app is loaded and

In my case, I only changed version from "@agm/core": "^1.0.0-beta.5" to "@agm/core": "1.0.0".

For angular 7, 8 the new version "@agm/core": "1.1.0" doesn't work and "@agm/core": "^1.0.0-beta.5" neither.

@angular/cli, To run a locally installed version of the angular-cli, you can call ng commands directly by adding the your component will be generated in src/app/feature/new -cmp You can find all possible blueprints in the table below: It should be done due to changing of package's name and scope from angular-cli to @ angular/cli :. By default in angular version 8, differential loading for ng build is enabled. However for ng test and ng serve, it only generates a single ES2015 build which cannot run in IE11. There're two ways to have ES5 code during serve which make angular 8 app work in IE11. Disable differential loading completely. (Not recommended)


I solved it by taking a clone of my project in a new folder and then upgraded the NPM version and installed node_modules again.

Angular For Beginners Guide, All these issues are related to a couple of inherent problems of the way that Using Yarn you will not run anymore into that very frequent scenario of use to scaffold Angular applications, we can run the following command: Terminate Running Angular App Step 4: Running Angular Project Forever Using PM2. To make your new application run in the background, freeing up the command prompt, use PM2 to serve it, as shown. PM2 also aids common system administration tasks such as restarting on failure, stopping, reloading configurations without downtime, and much more.

Using published libraries, Legacy JavaScript libraries that are not imported into an app can be added to the runtime Run or restart ng serve to see Bootstrap 4 working in your app. This blog post covers the basics to run your Angular application over HTTPS and the possible problems it can cause by doing so. At the end a solution is included to solve the most common problems

Executing "ng serve" or "npm start" command browser is not opening , Executing "ng serve" or "npm start" command browser is not opening automatically #1081 Thanks. On 18-Sep-2016 2:12 pm, "Chris Foster" I am not able to create angular js application(LINUX- UBUNTU 16) as every time� Now running npm run start starts serving my Angular app on https://localhost:4200, but when I navigate to this URL in Google Chrome I find that I am presented with a warning indicating that the

The preview pane on the right shows the starting state of the sample Angular app. It defines a frame with a top bar (containing the store name and checkout icon) and the title for a product list (which will be populated and dynamically updated with data from the application).