Could not find module “@angular-devkit/build-angular”












125















After updating to Angular 6.0.1, I get the following error on ng serve:



Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
Error: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
at Object.resolve (/home/Projects/myProjectName/node_modules/@angular-devkit/core/node/resolve.js:141:11)
at Observable.rxjs_1.Observable [as _subscribe] (/home/Projects/myProjectName/node_modules/@angular-devkit/architect/src/architect.js:132:40)


ng update says everything is in order. Deleting node_modules folder and a fresh npm install install did not help either.



My project is based on [ng2-admin(Angular4 version)].(https://github.com/akveo/ngx-admin) Here is my package.json dependecies:



 "dependencies": {
"@angular/animations": "^6.0.1",
"@angular/common": "^6.0.1",
"@angular/compiler": "^6.0.1",
"@angular/core": "^6.0.1",
"@angular/forms": "^6.0.1",
"@angular/http": "^6.0.1",
"@angular/platform-browser": "^6.0.1",
"@angular/platform-browser-dynamic": "^6.0.1",
"@angular/platform-server": "^6.0.1",
"@angular/router": "^6.0.1",
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26",
"@ngx-translate/core": "^10.0.1",
"@ngx-translate/http-loader": "^3.0.1",
"amcharts3": "github:amcharts/amcharts3",
"ammap3": "github:amcharts/ammap3",
"angular-table": "^1.0.4",
"angular2-csv": "^0.2.5",
"angular2-datatable": "0.6.0",
"animate.css": "3.5.2",
"bootstrap": "4.0.0-alpha.6",
"bower": "^1.8.4",
"chart.js": "1.1.1",
"chartist": "0.10.1",
"chroma-js": "1.3.3",
"ckeditor": "4.6.2",
"core-js": "2.4.1",
"easy-pie-chart": "2.1.7",
"font-awesome": "4.7.0",
"fullcalendar": "3.3.1",
"google-maps": "3.2.1",
"ionicons": "2.0.1",
"jquery": "3.2.1",
"jquery-slimscroll": "1.3.8",
"leaflet": "0.7.7",
"leaflet-map": "0.2.1",
"lodash": "4.17.4",
"ng2-ckeditor": "1.1.6",
"ng2-completer": "^1.6.3",
"ng2-handsontable": "^2.1.0-rc.3",
"ng2-slim-loading-bar": "^4.0.0",
"ng2-smart-table": "^1.0.3",
"ng2-tree": "2.0.0-alpha.5",
"ngx-uploader": "4.2.4",
"normalize.css": "6.0.0",
"roboto-fontface": "0.7.0",
"rxjs": "^6.1.0",
"rxjs-compat": "^6.1.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/cli": "^6.0.1",
"@angular/compiler-cli": "^6.0.1",
"@types/fullcalendar": "2.7.40",
"@types/jasmine": "2.5.38",
"@types/jquery": "2.0.41",
"@types/jquery.slimscroll": "1.3.30",
"@types/lodash": "4.14.61",
"@types/node": "6.0.69",
"codelyzer": "3.0.1",
"gh-pages": "0.12.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.1",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "0.2.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"npm-run-all": "4.0.2",
"protractor": "5.1.0",
"rimraf": "2.6.1",
"standard-changelog": "1.0.1",
"stylelint": "7.10.1",
"ts-node": "2.1.2",
"tslint": "5.2.0",
"tslint-eslint-rules": "4.0.0",
"tslint-language-service": "0.9.6",
"typescript": "^2.7.2",
"typogr": "0.6.6",
"underscore": "1.8.3",
"wintersmith": "2.2.5",
"wintersmith-sassy": "1.1.0"
}


and my angular.json:



{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ng2-admin": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico"
],
"styles": [
"node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
"node_modules/normalize.css/normalize.css",
"node_modules/font-awesome/scss/font-awesome.scss",
"node_modules/ionicons/scss/ionicons.scss",
"node_modules/bootstrap/scss/bootstrap.scss",
"node_modules/leaflet/dist/leaflet.css",
"node_modules/chartist/dist/chartist.css",
"node_modules/fullcalendar/dist/fullcalendar.css",
"node_modules/handsontable/dist/handsontable.full.css",
"node_modules/ng2-slim-loading-bar/style.css",
"src/app/theme/theme.scss",
"src/styles.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
"node_modules/jquery-slimscroll/jquery.slimscroll.js",
"node_modules/tether/dist/js/tether.js",
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/handsontable/dist/handsontable.full.js",
"node_modules/chroma-js/chroma.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ng2-admin:build"
},
"configurations": {
"production": {
"browserTarget": "ng2-admin:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ng2-admin:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
"node_modules/jquery-slimscroll/jquery.slimscroll.js",
"node_modules/tether/dist/js/tether.js",
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/handsontable/dist/handsontable.full.js",
"node_modules/chroma-js/chroma.js"
],
"styles": [
"node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
"node_modules/normalize.css/normalize.css",
"node_modules/font-awesome/scss/font-awesome.scss",
"node_modules/ionicons/scss/ionicons.scss",
"node_modules/bootstrap/scss/bootstrap.scss",
"node_modules/leaflet/dist/leaflet.css",
"node_modules/chartist/dist/chartist.css",
"node_modules/fullcalendar/dist/fullcalendar.css",
"node_modules/handsontable/dist/handsontable.full.css",
"node_modules/ng2-slim-loading-bar/style.css",
"src/app/theme/theme.scss",
"src/styles.scss"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude":
}
}
}
},
"ng2-admin-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "ng2-admin:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude":
}
}
}
}
},
"defaultProject": "ng2-admin",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}









share|improve this question



























    125















    After updating to Angular 6.0.1, I get the following error on ng serve:



    Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
    Error: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
    at Object.resolve (/home/Projects/myProjectName/node_modules/@angular-devkit/core/node/resolve.js:141:11)
    at Observable.rxjs_1.Observable [as _subscribe] (/home/Projects/myProjectName/node_modules/@angular-devkit/architect/src/architect.js:132:40)


    ng update says everything is in order. Deleting node_modules folder and a fresh npm install install did not help either.



    My project is based on [ng2-admin(Angular4 version)].(https://github.com/akveo/ngx-admin) Here is my package.json dependecies:



     "dependencies": {
    "@angular/animations": "^6.0.1",
    "@angular/common": "^6.0.1",
    "@angular/compiler": "^6.0.1",
    "@angular/core": "^6.0.1",
    "@angular/forms": "^6.0.1",
    "@angular/http": "^6.0.1",
    "@angular/platform-browser": "^6.0.1",
    "@angular/platform-browser-dynamic": "^6.0.1",
    "@angular/platform-server": "^6.0.1",
    "@angular/router": "^6.0.1",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26",
    "@ngx-translate/core": "^10.0.1",
    "@ngx-translate/http-loader": "^3.0.1",
    "amcharts3": "github:amcharts/amcharts3",
    "ammap3": "github:amcharts/ammap3",
    "angular-table": "^1.0.4",
    "angular2-csv": "^0.2.5",
    "angular2-datatable": "0.6.0",
    "animate.css": "3.5.2",
    "bootstrap": "4.0.0-alpha.6",
    "bower": "^1.8.4",
    "chart.js": "1.1.1",
    "chartist": "0.10.1",
    "chroma-js": "1.3.3",
    "ckeditor": "4.6.2",
    "core-js": "2.4.1",
    "easy-pie-chart": "2.1.7",
    "font-awesome": "4.7.0",
    "fullcalendar": "3.3.1",
    "google-maps": "3.2.1",
    "ionicons": "2.0.1",
    "jquery": "3.2.1",
    "jquery-slimscroll": "1.3.8",
    "leaflet": "0.7.7",
    "leaflet-map": "0.2.1",
    "lodash": "4.17.4",
    "ng2-ckeditor": "1.1.6",
    "ng2-completer": "^1.6.3",
    "ng2-handsontable": "^2.1.0-rc.3",
    "ng2-slim-loading-bar": "^4.0.0",
    "ng2-smart-table": "^1.0.3",
    "ng2-tree": "2.0.0-alpha.5",
    "ngx-uploader": "4.2.4",
    "normalize.css": "6.0.0",
    "roboto-fontface": "0.7.0",
    "rxjs": "^6.1.0",
    "rxjs-compat": "^6.1.0",
    "zone.js": "0.8.26"
    },
    "devDependencies": {
    "@angular/cli": "^6.0.1",
    "@angular/compiler-cli": "^6.0.1",
    "@types/fullcalendar": "2.7.40",
    "@types/jasmine": "2.5.38",
    "@types/jquery": "2.0.41",
    "@types/jquery.slimscroll": "1.3.30",
    "@types/lodash": "4.14.61",
    "@types/node": "6.0.69",
    "codelyzer": "3.0.1",
    "gh-pages": "0.12.0",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "3.2.0",
    "karma": "1.4.1",
    "karma-chrome-launcher": "2.0.0",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "0.2.0",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "npm-run-all": "4.0.2",
    "protractor": "5.1.0",
    "rimraf": "2.6.1",
    "standard-changelog": "1.0.1",
    "stylelint": "7.10.1",
    "ts-node": "2.1.2",
    "tslint": "5.2.0",
    "tslint-eslint-rules": "4.0.0",
    "tslint-language-service": "0.9.6",
    "typescript": "^2.7.2",
    "typogr": "0.6.6",
    "underscore": "1.8.3",
    "wintersmith": "2.2.5",
    "wintersmith-sassy": "1.1.0"
    }


    and my angular.json:



    {
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "projects": {
    "ng2-admin": {
    "root": "",
    "sourceRoot": "src",
    "projectType": "application",
    "architect": {
    "build": {
    "builder": "@angular-devkit/build-angular:browser",
    "options": {
    "outputPath": "dist",
    "index": "src/index.html",
    "main": "src/main.ts",
    "tsConfig": "src/tsconfig.app.json",
    "polyfills": "src/polyfills.ts",
    "assets": [
    "src/assets",
    "src/favicon.ico"
    ],
    "styles": [
    "node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
    "node_modules/normalize.css/normalize.css",
    "node_modules/font-awesome/scss/font-awesome.scss",
    "node_modules/ionicons/scss/ionicons.scss",
    "node_modules/bootstrap/scss/bootstrap.scss",
    "node_modules/leaflet/dist/leaflet.css",
    "node_modules/chartist/dist/chartist.css",
    "node_modules/fullcalendar/dist/fullcalendar.css",
    "node_modules/handsontable/dist/handsontable.full.css",
    "node_modules/ng2-slim-loading-bar/style.css",
    "src/app/theme/theme.scss",
    "src/styles.scss"
    ],
    "scripts": [
    "node_modules/jquery/dist/jquery.js",
    "node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
    "node_modules/jquery-slimscroll/jquery.slimscroll.js",
    "node_modules/tether/dist/js/tether.js",
    "node_modules/bootstrap/dist/js/bootstrap.js",
    "node_modules/handsontable/dist/handsontable.full.js",
    "node_modules/chroma-js/chroma.js"
    ]
    },
    "configurations": {
    "production": {
    "optimization": true,
    "outputHashing": "all",
    "sourceMap": false,
    "extractCss": true,
    "namedChunks": false,
    "aot": true,
    "extractLicenses": true,
    "vendorChunk": false,
    "buildOptimizer": true,
    "fileReplacements": [
    {
    "replace": "src/environments/environment.ts",
    "with": "src/environments/environment.prod.ts"
    }
    ]
    }
    }
    },
    "serve": {
    "builder": "@angular-devkit/build-angular:dev-server",
    "options": {
    "browserTarget": "ng2-admin:build"
    },
    "configurations": {
    "production": {
    "browserTarget": "ng2-admin:build:production"
    }
    }
    },
    "extract-i18n": {
    "builder": "@angular-devkit/build-angular:extract-i18n",
    "options": {
    "browserTarget": "ng2-admin:build"
    }
    },
    "test": {
    "builder": "@angular-devkit/build-angular:karma",
    "options": {
    "main": "src/test.ts",
    "karmaConfig": "./karma.conf.js",
    "polyfills": "src/polyfills.ts",
    "tsConfig": "src/tsconfig.spec.json",
    "scripts": [
    "node_modules/jquery/dist/jquery.js",
    "node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
    "node_modules/jquery-slimscroll/jquery.slimscroll.js",
    "node_modules/tether/dist/js/tether.js",
    "node_modules/bootstrap/dist/js/bootstrap.js",
    "node_modules/handsontable/dist/handsontable.full.js",
    "node_modules/chroma-js/chroma.js"
    ],
    "styles": [
    "node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
    "node_modules/normalize.css/normalize.css",
    "node_modules/font-awesome/scss/font-awesome.scss",
    "node_modules/ionicons/scss/ionicons.scss",
    "node_modules/bootstrap/scss/bootstrap.scss",
    "node_modules/leaflet/dist/leaflet.css",
    "node_modules/chartist/dist/chartist.css",
    "node_modules/fullcalendar/dist/fullcalendar.css",
    "node_modules/handsontable/dist/handsontable.full.css",
    "node_modules/ng2-slim-loading-bar/style.css",
    "src/app/theme/theme.scss",
    "src/styles.scss"
    ],
    "assets": [
    "src/assets",
    "src/favicon.ico"
    ]
    }
    },
    "lint": {
    "builder": "@angular-devkit/build-angular:tslint",
    "options": {
    "tsConfig": [
    "src/tsconfig.app.json",
    "src/tsconfig.spec.json"
    ],
    "exclude":
    }
    }
    }
    },
    "ng2-admin-e2e": {
    "root": "",
    "sourceRoot": "",
    "projectType": "application",
    "architect": {
    "e2e": {
    "builder": "@angular-devkit/build-angular:protractor",
    "options": {
    "protractorConfig": "./protractor.conf.js",
    "devServerTarget": "ng2-admin:serve"
    }
    },
    "lint": {
    "builder": "@angular-devkit/build-angular:tslint",
    "options": {
    "tsConfig": [
    "e2e/tsconfig.e2e.json"
    ],
    "exclude":
    }
    }
    }
    }
    },
    "defaultProject": "ng2-admin",
    "schematics": {
    "@schematics/angular:component": {
    "prefix": "app",
    "styleext": "scss"
    },
    "@schematics/angular:directive": {
    "prefix": "app"
    }
    }
    }









    share|improve this question

























      125












      125








      125


      33






      After updating to Angular 6.0.1, I get the following error on ng serve:



      Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
      Error: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
      at Object.resolve (/home/Projects/myProjectName/node_modules/@angular-devkit/core/node/resolve.js:141:11)
      at Observable.rxjs_1.Observable [as _subscribe] (/home/Projects/myProjectName/node_modules/@angular-devkit/architect/src/architect.js:132:40)


      ng update says everything is in order. Deleting node_modules folder and a fresh npm install install did not help either.



      My project is based on [ng2-admin(Angular4 version)].(https://github.com/akveo/ngx-admin) Here is my package.json dependecies:



       "dependencies": {
      "@angular/animations": "^6.0.1",
      "@angular/common": "^6.0.1",
      "@angular/compiler": "^6.0.1",
      "@angular/core": "^6.0.1",
      "@angular/forms": "^6.0.1",
      "@angular/http": "^6.0.1",
      "@angular/platform-browser": "^6.0.1",
      "@angular/platform-browser-dynamic": "^6.0.1",
      "@angular/platform-server": "^6.0.1",
      "@angular/router": "^6.0.1",
      "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26",
      "@ngx-translate/core": "^10.0.1",
      "@ngx-translate/http-loader": "^3.0.1",
      "amcharts3": "github:amcharts/amcharts3",
      "ammap3": "github:amcharts/ammap3",
      "angular-table": "^1.0.4",
      "angular2-csv": "^0.2.5",
      "angular2-datatable": "0.6.0",
      "animate.css": "3.5.2",
      "bootstrap": "4.0.0-alpha.6",
      "bower": "^1.8.4",
      "chart.js": "1.1.1",
      "chartist": "0.10.1",
      "chroma-js": "1.3.3",
      "ckeditor": "4.6.2",
      "core-js": "2.4.1",
      "easy-pie-chart": "2.1.7",
      "font-awesome": "4.7.0",
      "fullcalendar": "3.3.1",
      "google-maps": "3.2.1",
      "ionicons": "2.0.1",
      "jquery": "3.2.1",
      "jquery-slimscroll": "1.3.8",
      "leaflet": "0.7.7",
      "leaflet-map": "0.2.1",
      "lodash": "4.17.4",
      "ng2-ckeditor": "1.1.6",
      "ng2-completer": "^1.6.3",
      "ng2-handsontable": "^2.1.0-rc.3",
      "ng2-slim-loading-bar": "^4.0.0",
      "ng2-smart-table": "^1.0.3",
      "ng2-tree": "2.0.0-alpha.5",
      "ngx-uploader": "4.2.4",
      "normalize.css": "6.0.0",
      "roboto-fontface": "0.7.0",
      "rxjs": "^6.1.0",
      "rxjs-compat": "^6.1.0",
      "zone.js": "0.8.26"
      },
      "devDependencies": {
      "@angular/cli": "^6.0.1",
      "@angular/compiler-cli": "^6.0.1",
      "@types/fullcalendar": "2.7.40",
      "@types/jasmine": "2.5.38",
      "@types/jquery": "2.0.41",
      "@types/jquery.slimscroll": "1.3.30",
      "@types/lodash": "4.14.61",
      "@types/node": "6.0.69",
      "codelyzer": "3.0.1",
      "gh-pages": "0.12.0",
      "jasmine-core": "2.5.2",
      "jasmine-spec-reporter": "3.2.0",
      "karma": "1.4.1",
      "karma-chrome-launcher": "2.0.0",
      "karma-cli": "1.0.1",
      "karma-coverage-istanbul-reporter": "0.2.0",
      "karma-jasmine": "1.1.0",
      "karma-jasmine-html-reporter": "0.2.2",
      "npm-run-all": "4.0.2",
      "protractor": "5.1.0",
      "rimraf": "2.6.1",
      "standard-changelog": "1.0.1",
      "stylelint": "7.10.1",
      "ts-node": "2.1.2",
      "tslint": "5.2.0",
      "tslint-eslint-rules": "4.0.0",
      "tslint-language-service": "0.9.6",
      "typescript": "^2.7.2",
      "typogr": "0.6.6",
      "underscore": "1.8.3",
      "wintersmith": "2.2.5",
      "wintersmith-sassy": "1.1.0"
      }


      and my angular.json:



      {
      "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
      "version": 1,
      "newProjectRoot": "projects",
      "projects": {
      "ng2-admin": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "architect": {
      "build": {
      "builder": "@angular-devkit/build-angular:browser",
      "options": {
      "outputPath": "dist",
      "index": "src/index.html",
      "main": "src/main.ts",
      "tsConfig": "src/tsconfig.app.json",
      "polyfills": "src/polyfills.ts",
      "assets": [
      "src/assets",
      "src/favicon.ico"
      ],
      "styles": [
      "node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
      "node_modules/normalize.css/normalize.css",
      "node_modules/font-awesome/scss/font-awesome.scss",
      "node_modules/ionicons/scss/ionicons.scss",
      "node_modules/bootstrap/scss/bootstrap.scss",
      "node_modules/leaflet/dist/leaflet.css",
      "node_modules/chartist/dist/chartist.css",
      "node_modules/fullcalendar/dist/fullcalendar.css",
      "node_modules/handsontable/dist/handsontable.full.css",
      "node_modules/ng2-slim-loading-bar/style.css",
      "src/app/theme/theme.scss",
      "src/styles.scss"
      ],
      "scripts": [
      "node_modules/jquery/dist/jquery.js",
      "node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
      "node_modules/jquery-slimscroll/jquery.slimscroll.js",
      "node_modules/tether/dist/js/tether.js",
      "node_modules/bootstrap/dist/js/bootstrap.js",
      "node_modules/handsontable/dist/handsontable.full.js",
      "node_modules/chroma-js/chroma.js"
      ]
      },
      "configurations": {
      "production": {
      "optimization": true,
      "outputHashing": "all",
      "sourceMap": false,
      "extractCss": true,
      "namedChunks": false,
      "aot": true,
      "extractLicenses": true,
      "vendorChunk": false,
      "buildOptimizer": true,
      "fileReplacements": [
      {
      "replace": "src/environments/environment.ts",
      "with": "src/environments/environment.prod.ts"
      }
      ]
      }
      }
      },
      "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
      "browserTarget": "ng2-admin:build"
      },
      "configurations": {
      "production": {
      "browserTarget": "ng2-admin:build:production"
      }
      }
      },
      "extract-i18n": {
      "builder": "@angular-devkit/build-angular:extract-i18n",
      "options": {
      "browserTarget": "ng2-admin:build"
      }
      },
      "test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
      "main": "src/test.ts",
      "karmaConfig": "./karma.conf.js",
      "polyfills": "src/polyfills.ts",
      "tsConfig": "src/tsconfig.spec.json",
      "scripts": [
      "node_modules/jquery/dist/jquery.js",
      "node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
      "node_modules/jquery-slimscroll/jquery.slimscroll.js",
      "node_modules/tether/dist/js/tether.js",
      "node_modules/bootstrap/dist/js/bootstrap.js",
      "node_modules/handsontable/dist/handsontable.full.js",
      "node_modules/chroma-js/chroma.js"
      ],
      "styles": [
      "node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
      "node_modules/normalize.css/normalize.css",
      "node_modules/font-awesome/scss/font-awesome.scss",
      "node_modules/ionicons/scss/ionicons.scss",
      "node_modules/bootstrap/scss/bootstrap.scss",
      "node_modules/leaflet/dist/leaflet.css",
      "node_modules/chartist/dist/chartist.css",
      "node_modules/fullcalendar/dist/fullcalendar.css",
      "node_modules/handsontable/dist/handsontable.full.css",
      "node_modules/ng2-slim-loading-bar/style.css",
      "src/app/theme/theme.scss",
      "src/styles.scss"
      ],
      "assets": [
      "src/assets",
      "src/favicon.ico"
      ]
      }
      },
      "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
      "tsConfig": [
      "src/tsconfig.app.json",
      "src/tsconfig.spec.json"
      ],
      "exclude":
      }
      }
      }
      },
      "ng2-admin-e2e": {
      "root": "",
      "sourceRoot": "",
      "projectType": "application",
      "architect": {
      "e2e": {
      "builder": "@angular-devkit/build-angular:protractor",
      "options": {
      "protractorConfig": "./protractor.conf.js",
      "devServerTarget": "ng2-admin:serve"
      }
      },
      "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
      "tsConfig": [
      "e2e/tsconfig.e2e.json"
      ],
      "exclude":
      }
      }
      }
      }
      },
      "defaultProject": "ng2-admin",
      "schematics": {
      "@schematics/angular:component": {
      "prefix": "app",
      "styleext": "scss"
      },
      "@schematics/angular:directive": {
      "prefix": "app"
      }
      }
      }









      share|improve this question














      After updating to Angular 6.0.1, I get the following error on ng serve:



      Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
      Error: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
      at Object.resolve (/home/Projects/myProjectName/node_modules/@angular-devkit/core/node/resolve.js:141:11)
      at Observable.rxjs_1.Observable [as _subscribe] (/home/Projects/myProjectName/node_modules/@angular-devkit/architect/src/architect.js:132:40)


      ng update says everything is in order. Deleting node_modules folder and a fresh npm install install did not help either.



      My project is based on [ng2-admin(Angular4 version)].(https://github.com/akveo/ngx-admin) Here is my package.json dependecies:



       "dependencies": {
      "@angular/animations": "^6.0.1",
      "@angular/common": "^6.0.1",
      "@angular/compiler": "^6.0.1",
      "@angular/core": "^6.0.1",
      "@angular/forms": "^6.0.1",
      "@angular/http": "^6.0.1",
      "@angular/platform-browser": "^6.0.1",
      "@angular/platform-browser-dynamic": "^6.0.1",
      "@angular/platform-server": "^6.0.1",
      "@angular/router": "^6.0.1",
      "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26",
      "@ngx-translate/core": "^10.0.1",
      "@ngx-translate/http-loader": "^3.0.1",
      "amcharts3": "github:amcharts/amcharts3",
      "ammap3": "github:amcharts/ammap3",
      "angular-table": "^1.0.4",
      "angular2-csv": "^0.2.5",
      "angular2-datatable": "0.6.0",
      "animate.css": "3.5.2",
      "bootstrap": "4.0.0-alpha.6",
      "bower": "^1.8.4",
      "chart.js": "1.1.1",
      "chartist": "0.10.1",
      "chroma-js": "1.3.3",
      "ckeditor": "4.6.2",
      "core-js": "2.4.1",
      "easy-pie-chart": "2.1.7",
      "font-awesome": "4.7.0",
      "fullcalendar": "3.3.1",
      "google-maps": "3.2.1",
      "ionicons": "2.0.1",
      "jquery": "3.2.1",
      "jquery-slimscroll": "1.3.8",
      "leaflet": "0.7.7",
      "leaflet-map": "0.2.1",
      "lodash": "4.17.4",
      "ng2-ckeditor": "1.1.6",
      "ng2-completer": "^1.6.3",
      "ng2-handsontable": "^2.1.0-rc.3",
      "ng2-slim-loading-bar": "^4.0.0",
      "ng2-smart-table": "^1.0.3",
      "ng2-tree": "2.0.0-alpha.5",
      "ngx-uploader": "4.2.4",
      "normalize.css": "6.0.0",
      "roboto-fontface": "0.7.0",
      "rxjs": "^6.1.0",
      "rxjs-compat": "^6.1.0",
      "zone.js": "0.8.26"
      },
      "devDependencies": {
      "@angular/cli": "^6.0.1",
      "@angular/compiler-cli": "^6.0.1",
      "@types/fullcalendar": "2.7.40",
      "@types/jasmine": "2.5.38",
      "@types/jquery": "2.0.41",
      "@types/jquery.slimscroll": "1.3.30",
      "@types/lodash": "4.14.61",
      "@types/node": "6.0.69",
      "codelyzer": "3.0.1",
      "gh-pages": "0.12.0",
      "jasmine-core": "2.5.2",
      "jasmine-spec-reporter": "3.2.0",
      "karma": "1.4.1",
      "karma-chrome-launcher": "2.0.0",
      "karma-cli": "1.0.1",
      "karma-coverage-istanbul-reporter": "0.2.0",
      "karma-jasmine": "1.1.0",
      "karma-jasmine-html-reporter": "0.2.2",
      "npm-run-all": "4.0.2",
      "protractor": "5.1.0",
      "rimraf": "2.6.1",
      "standard-changelog": "1.0.1",
      "stylelint": "7.10.1",
      "ts-node": "2.1.2",
      "tslint": "5.2.0",
      "tslint-eslint-rules": "4.0.0",
      "tslint-language-service": "0.9.6",
      "typescript": "^2.7.2",
      "typogr": "0.6.6",
      "underscore": "1.8.3",
      "wintersmith": "2.2.5",
      "wintersmith-sassy": "1.1.0"
      }


      and my angular.json:



      {
      "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
      "version": 1,
      "newProjectRoot": "projects",
      "projects": {
      "ng2-admin": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "architect": {
      "build": {
      "builder": "@angular-devkit/build-angular:browser",
      "options": {
      "outputPath": "dist",
      "index": "src/index.html",
      "main": "src/main.ts",
      "tsConfig": "src/tsconfig.app.json",
      "polyfills": "src/polyfills.ts",
      "assets": [
      "src/assets",
      "src/favicon.ico"
      ],
      "styles": [
      "node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
      "node_modules/normalize.css/normalize.css",
      "node_modules/font-awesome/scss/font-awesome.scss",
      "node_modules/ionicons/scss/ionicons.scss",
      "node_modules/bootstrap/scss/bootstrap.scss",
      "node_modules/leaflet/dist/leaflet.css",
      "node_modules/chartist/dist/chartist.css",
      "node_modules/fullcalendar/dist/fullcalendar.css",
      "node_modules/handsontable/dist/handsontable.full.css",
      "node_modules/ng2-slim-loading-bar/style.css",
      "src/app/theme/theme.scss",
      "src/styles.scss"
      ],
      "scripts": [
      "node_modules/jquery/dist/jquery.js",
      "node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
      "node_modules/jquery-slimscroll/jquery.slimscroll.js",
      "node_modules/tether/dist/js/tether.js",
      "node_modules/bootstrap/dist/js/bootstrap.js",
      "node_modules/handsontable/dist/handsontable.full.js",
      "node_modules/chroma-js/chroma.js"
      ]
      },
      "configurations": {
      "production": {
      "optimization": true,
      "outputHashing": "all",
      "sourceMap": false,
      "extractCss": true,
      "namedChunks": false,
      "aot": true,
      "extractLicenses": true,
      "vendorChunk": false,
      "buildOptimizer": true,
      "fileReplacements": [
      {
      "replace": "src/environments/environment.ts",
      "with": "src/environments/environment.prod.ts"
      }
      ]
      }
      }
      },
      "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
      "browserTarget": "ng2-admin:build"
      },
      "configurations": {
      "production": {
      "browserTarget": "ng2-admin:build:production"
      }
      }
      },
      "extract-i18n": {
      "builder": "@angular-devkit/build-angular:extract-i18n",
      "options": {
      "browserTarget": "ng2-admin:build"
      }
      },
      "test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
      "main": "src/test.ts",
      "karmaConfig": "./karma.conf.js",
      "polyfills": "src/polyfills.ts",
      "tsConfig": "src/tsconfig.spec.json",
      "scripts": [
      "node_modules/jquery/dist/jquery.js",
      "node_modules/easy-pie-chart/dist/jquery.easypiechart.js",
      "node_modules/jquery-slimscroll/jquery.slimscroll.js",
      "node_modules/tether/dist/js/tether.js",
      "node_modules/bootstrap/dist/js/bootstrap.js",
      "node_modules/handsontable/dist/handsontable.full.js",
      "node_modules/chroma-js/chroma.js"
      ],
      "styles": [
      "node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss",
      "node_modules/normalize.css/normalize.css",
      "node_modules/font-awesome/scss/font-awesome.scss",
      "node_modules/ionicons/scss/ionicons.scss",
      "node_modules/bootstrap/scss/bootstrap.scss",
      "node_modules/leaflet/dist/leaflet.css",
      "node_modules/chartist/dist/chartist.css",
      "node_modules/fullcalendar/dist/fullcalendar.css",
      "node_modules/handsontable/dist/handsontable.full.css",
      "node_modules/ng2-slim-loading-bar/style.css",
      "src/app/theme/theme.scss",
      "src/styles.scss"
      ],
      "assets": [
      "src/assets",
      "src/favicon.ico"
      ]
      }
      },
      "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
      "tsConfig": [
      "src/tsconfig.app.json",
      "src/tsconfig.spec.json"
      ],
      "exclude":
      }
      }
      }
      },
      "ng2-admin-e2e": {
      "root": "",
      "sourceRoot": "",
      "projectType": "application",
      "architect": {
      "e2e": {
      "builder": "@angular-devkit/build-angular:protractor",
      "options": {
      "protractorConfig": "./protractor.conf.js",
      "devServerTarget": "ng2-admin:serve"
      }
      },
      "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
      "tsConfig": [
      "e2e/tsconfig.e2e.json"
      ],
      "exclude":
      }
      }
      }
      }
      },
      "defaultProject": "ng2-admin",
      "schematics": {
      "@schematics/angular:component": {
      "prefix": "app",
      "styleext": "scss"
      },
      "@schematics/angular:directive": {
      "prefix": "app"
      }
      }
      }






      angular angular-cli angular6 angular-cli-v6






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 14 '18 at 14:38









      ForestGForestG

      2,38931429




      2,38931429
























          21 Answers
          21






          active

          oldest

          votes


















          222














          Install @angular-devkit/build-angular as dev dependency. This package is newly introduced in Angular 6.0



          npm install --save-dev @angular-devkit/build-angular



          or,



          yarn add @angular-devkit/build-angular --dev






          share|improve this answer


























          • I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

            – subzerodeluxe
            May 15 '18 at 8:55











          • Exact same error? And the configuration file? are they same as this question?

            – Ritwick Dey
            May 15 '18 at 10:23











          • Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

            – subzerodeluxe
            May 15 '18 at 16:32






          • 1





            Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

            – HockeyJ
            Nov 21 '18 at 16:30






          • 2





            Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

            – Dan King
            Nov 21 '18 at 20:41





















          43














          npm update


          It worked like a charm.






          share|improve this answer



















          • 1





            I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

            – Heliac
            Aug 15 '18 at 13:41











          • After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

            – Moni
            Dec 4 '18 at 15:20











          • Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

            – Liam
            Jan 14 at 19:25











          • It resolve all dependencies :). +1

            – Hammad Sajid
            2 days ago



















          19














          for angular 6 and above



          The working solution for me was



          npm install



          ng update



          and finally



          npm update






          share|improve this answer































            3














            If the following command does not work,



            npm install --save-dev @angular-devkit/build-angular


            then move to the project folder and run this command:



            npm install --save @angular-devkit/build-angular





            share|improve this answer


























            • npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

              – asifaftab87
              Mar 9 at 6:16



















            3














            npm install
            Just type npm install and run.Then the project will run without errors.
            Or you can use npm install --save-dev @angular-devkit/build-angular






            share|improve this answer































              2














              Need to explicitly get devDependencies.



              npm i --only=dev





              share|improve this answer



















              • 1





                This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                – iizAck
                Jan 11 at 13:58



















              2














              All of the above answer are correct but they did not work for me. The only way I was able to make this work was by follow steps/commands:



              npm uninstall -g @angular/cli@6.0.8
              npm cache clean --force
              npm install -g @angular/cli@latest
              npm install node-sass -g
              ng new MY_PROJECT_NAME
              cp -r from_my_old_project to_new_MY_PROJECT_NAME





              share|improve this answer

































                2














                I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.



                1. npm update -g @angular/cli

                2. editing my package.json changing the line
                "@angular/cli": "1.6.0",
                to
                "@angular/cli": "^1.6.0",

                3. npm update


                I hope my help is effective ツ






                share|improve this answer
























                • This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                  – SanSolo
                  Dec 20 '18 at 11:18



















                1














                When we run commands like ng serve, it uses the local version of @angular/cli. So first install latest version of @angular/cli locally (without the -g flag). Then update the cli using ng update @angular/cli command. I thing this should fix the issue. Thanks



                This link may help you if you are updating your angular project https://update.angular.io/






                share|improve this answer































                  0














                  running the following worked for me
                  npm audit fix --force






                  share|improve this answer































                    0














                    add @angular-devkit/build-angular under your dev dependency and it will work, or you can also execute




                    npm install --save-dev @angular-devkit/build-angular







                    share|improve this answer































                      0














                      Delete package-lock.json and do npm install again. It should fix the issue.



                      ** This fix is more suitable when you have created Angular 6 app using ng new and after installing other dependencies you find this error.






                      share|improve this answer































                        0














                        Try this one.



                        npm install

                        npm update

                        if it's shows something like this.



                        run npm audit fix to fix them, or npm audit for details




                        Do that!






                        share|improve this answer































                          0














                          In my case, the issue is because of missing dependencies. Why dependencies is missing, because I've forgotten to call:



                          npm install



                          After calling the above command, all required dependencies are loaded in node_modules, and that is no more issue






                          share|improve this answer































                            0














                            Following commands works 
                            npm install
                            ng update
                            -You may see the message "We analyzed your package.json and everything seems to be in order. Good work!"
                            npm update

                            Then try dev build
                            ng build
                            I got the error with type script, downgraded to
                            npm install typescript@">=3.1.1 <3.2

                            ng build --prod

                            All success with prod build.

                            Below is the working combination

                            ng --version

                            Package Version
                            -----------------------------------------------------------
                            @angular-devkit/architect 0.11.0
                            @angular-devkit/build-angular 0.11.0
                            @angular-devkit/build-optimizer 0.11.0
                            @angular-devkit/build-webpack 0.11.0
                            @angular-devkit/core 7.1.0
                            @angular-devkit/schematics 7.1.0
                            @angular/cli 7.1.0
                            @ngtools/webpack 7.1.0
                            @schematics/angular 7.1.0
                            @schematics/update 0.11.0
                            rxjs 6.3.3
                            typescript 3.1.6
                            webpack 4.23.1





                            share|improve this answer































                              0














                              Solution



                              Execute below Command on your CLI :




                              • npm install






                              share|improve this answer































                                0















                                • Delete the node_modules.

                                • Clear the cache using'npm cache clean --verify'.

                                • And then npm install again.


                                Works like a charm for me.






                                share|improve this answer































                                  -1














                                  I am facing the same issue since 2 days.



                                  ng -v :6.0.8
                                  node -v :8.11.2
                                  npm -v :6.1.0


                                  Make sure you are in the folder where angular.json is installed. Get into that and type ng serve. If the issue still arises, then you are having only dependencies installed in node_modules. Type the following, and it will work:



                                  npm i --only=dev





                                  share|improve this answer

































                                    -1














                                    you npm version is old, try to run the following command:



                                    npm i npm@latest -g





                                    share|improve this answer

































                                      -1














                                      First set proxy if you are in a restricted environment
                                      Then do






                                      npm install





                                      This will definitely work






                                      share|improve this answer































                                        -1















                                        Simple solution




                                        Hit below commend only to fix this error



                                        npm install --save-dev @angular-devkit/build-angular





                                        share|improve this answer























                                          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%2f50333003%2fcould-not-find-module-angular-devkit-build-angular%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown

























                                          21 Answers
                                          21






                                          active

                                          oldest

                                          votes








                                          21 Answers
                                          21






                                          active

                                          oldest

                                          votes









                                          active

                                          oldest

                                          votes






                                          active

                                          oldest

                                          votes









                                          222














                                          Install @angular-devkit/build-angular as dev dependency. This package is newly introduced in Angular 6.0



                                          npm install --save-dev @angular-devkit/build-angular



                                          or,



                                          yarn add @angular-devkit/build-angular --dev






                                          share|improve this answer


























                                          • I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

                                            – subzerodeluxe
                                            May 15 '18 at 8:55











                                          • Exact same error? And the configuration file? are they same as this question?

                                            – Ritwick Dey
                                            May 15 '18 at 10:23











                                          • Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

                                            – subzerodeluxe
                                            May 15 '18 at 16:32






                                          • 1





                                            Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

                                            – HockeyJ
                                            Nov 21 '18 at 16:30






                                          • 2





                                            Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

                                            – Dan King
                                            Nov 21 '18 at 20:41


















                                          222














                                          Install @angular-devkit/build-angular as dev dependency. This package is newly introduced in Angular 6.0



                                          npm install --save-dev @angular-devkit/build-angular



                                          or,



                                          yarn add @angular-devkit/build-angular --dev






                                          share|improve this answer


























                                          • I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

                                            – subzerodeluxe
                                            May 15 '18 at 8:55











                                          • Exact same error? And the configuration file? are they same as this question?

                                            – Ritwick Dey
                                            May 15 '18 at 10:23











                                          • Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

                                            – subzerodeluxe
                                            May 15 '18 at 16:32






                                          • 1





                                            Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

                                            – HockeyJ
                                            Nov 21 '18 at 16:30






                                          • 2





                                            Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

                                            – Dan King
                                            Nov 21 '18 at 20:41
















                                          222












                                          222








                                          222







                                          Install @angular-devkit/build-angular as dev dependency. This package is newly introduced in Angular 6.0



                                          npm install --save-dev @angular-devkit/build-angular



                                          or,



                                          yarn add @angular-devkit/build-angular --dev






                                          share|improve this answer















                                          Install @angular-devkit/build-angular as dev dependency. This package is newly introduced in Angular 6.0



                                          npm install --save-dev @angular-devkit/build-angular



                                          or,



                                          yarn add @angular-devkit/build-angular --dev







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited May 16 '18 at 5:12

























                                          answered May 14 '18 at 14:44









                                          Ritwick DeyRitwick Dey

                                          4,84221129




                                          4,84221129













                                          • I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

                                            – subzerodeluxe
                                            May 15 '18 at 8:55











                                          • Exact same error? And the configuration file? are they same as this question?

                                            – Ritwick Dey
                                            May 15 '18 at 10:23











                                          • Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

                                            – subzerodeluxe
                                            May 15 '18 at 16:32






                                          • 1





                                            Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

                                            – HockeyJ
                                            Nov 21 '18 at 16:30






                                          • 2





                                            Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

                                            – Dan King
                                            Nov 21 '18 at 20:41





















                                          • I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

                                            – subzerodeluxe
                                            May 15 '18 at 8:55











                                          • Exact same error? And the configuration file? are they same as this question?

                                            – Ritwick Dey
                                            May 15 '18 at 10:23











                                          • Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

                                            – subzerodeluxe
                                            May 15 '18 at 16:32






                                          • 1





                                            Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

                                            – HockeyJ
                                            Nov 21 '18 at 16:30






                                          • 2





                                            Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

                                            – Dan King
                                            Nov 21 '18 at 20:41



















                                          I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

                                          – subzerodeluxe
                                          May 15 '18 at 8:55





                                          I face the same problem. Unfortunately your solution didn't work for me. Do you have any other suggestions?

                                          – subzerodeluxe
                                          May 15 '18 at 8:55













                                          Exact same error? And the configuration file? are they same as this question?

                                          – Ritwick Dey
                                          May 15 '18 at 10:23





                                          Exact same error? And the configuration file? are they same as this question?

                                          – Ritwick Dey
                                          May 15 '18 at 10:23













                                          Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

                                          – subzerodeluxe
                                          May 15 '18 at 16:32





                                          Yes. Well, I did some more exploring on this issue. Turns out that it works fine on my Mac Mini, so it will probably has something to do with my Node setup on Windows.

                                          – subzerodeluxe
                                          May 15 '18 at 16:32




                                          1




                                          1





                                          Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

                                          – HockeyJ
                                          Nov 21 '18 at 16:30





                                          Upgrade to angular 7 - the accepted answer fixed the error (have upvoted), but didn't solve the upgrade problem overall. This did stackoverflow.com/a/51592138/852806

                                          – HockeyJ
                                          Nov 21 '18 at 16:30




                                          2




                                          2





                                          Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

                                          – Dan King
                                          Nov 21 '18 at 20:41







                                          Thanks for this. I just hit this problem while attempting to follow the Angular tutorial: angular.io/guide/quickstart - seems like someone forgot to update the documentation?

                                          – Dan King
                                          Nov 21 '18 at 20:41















                                          43














                                          npm update


                                          It worked like a charm.






                                          share|improve this answer



















                                          • 1





                                            I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

                                            – Heliac
                                            Aug 15 '18 at 13:41











                                          • After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

                                            – Moni
                                            Dec 4 '18 at 15:20











                                          • Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

                                            – Liam
                                            Jan 14 at 19:25











                                          • It resolve all dependencies :). +1

                                            – Hammad Sajid
                                            2 days ago
















                                          43














                                          npm update


                                          It worked like a charm.






                                          share|improve this answer



















                                          • 1





                                            I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

                                            – Heliac
                                            Aug 15 '18 at 13:41











                                          • After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

                                            – Moni
                                            Dec 4 '18 at 15:20











                                          • Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

                                            – Liam
                                            Jan 14 at 19:25











                                          • It resolve all dependencies :). +1

                                            – Hammad Sajid
                                            2 days ago














                                          43












                                          43








                                          43







                                          npm update


                                          It worked like a charm.






                                          share|improve this answer













                                          npm update


                                          It worked like a charm.







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Jul 29 '18 at 15:47









                                          Ajay TakurAjay Takur

                                          2,17022637




                                          2,17022637








                                          • 1





                                            I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

                                            – Heliac
                                            Aug 15 '18 at 13:41











                                          • After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

                                            – Moni
                                            Dec 4 '18 at 15:20











                                          • Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

                                            – Liam
                                            Jan 14 at 19:25











                                          • It resolve all dependencies :). +1

                                            – Hammad Sajid
                                            2 days ago














                                          • 1





                                            I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

                                            – Heliac
                                            Aug 15 '18 at 13:41











                                          • After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

                                            – Moni
                                            Dec 4 '18 at 15:20











                                          • Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

                                            – Liam
                                            Jan 14 at 19:25











                                          • It resolve all dependencies :). +1

                                            – Hammad Sajid
                                            2 days ago








                                          1




                                          1





                                          I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

                                          – Heliac
                                          Aug 15 '18 at 13:41





                                          I moved to a new machine halfway through the angular-tour-of-heroes tutorial and pulled the half baked work from source control. This fixed it.

                                          – Heliac
                                          Aug 15 '18 at 13:41













                                          After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

                                          – Moni
                                          Dec 4 '18 at 15:20





                                          After creating a branch in my coworker's project, I got the error message. This fixed it. Thank you.

                                          – Moni
                                          Dec 4 '18 at 15:20













                                          Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

                                          – Liam
                                          Jan 14 at 19:25





                                          Nothing "half baked" about not checking in the node modules folder. This simply rebuilds your node modules based on your package.json. This is perfectly normal thing to do when you check out a new solution.

                                          – Liam
                                          Jan 14 at 19:25













                                          It resolve all dependencies :). +1

                                          – Hammad Sajid
                                          2 days ago





                                          It resolve all dependencies :). +1

                                          – Hammad Sajid
                                          2 days ago











                                          19














                                          for angular 6 and above



                                          The working solution for me was



                                          npm install



                                          ng update



                                          and finally



                                          npm update






                                          share|improve this answer




























                                            19














                                            for angular 6 and above



                                            The working solution for me was



                                            npm install



                                            ng update



                                            and finally



                                            npm update






                                            share|improve this answer


























                                              19












                                              19








                                              19







                                              for angular 6 and above



                                              The working solution for me was



                                              npm install



                                              ng update



                                              and finally



                                              npm update






                                              share|improve this answer













                                              for angular 6 and above



                                              The working solution for me was



                                              npm install



                                              ng update



                                              and finally



                                              npm update







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Nov 7 '18 at 13:42









                                              user9964622user9964622

                                              1,20221542




                                              1,20221542























                                                  3














                                                  If the following command does not work,



                                                  npm install --save-dev @angular-devkit/build-angular


                                                  then move to the project folder and run this command:



                                                  npm install --save @angular-devkit/build-angular





                                                  share|improve this answer


























                                                  • npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

                                                    – asifaftab87
                                                    Mar 9 at 6:16
















                                                  3














                                                  If the following command does not work,



                                                  npm install --save-dev @angular-devkit/build-angular


                                                  then move to the project folder and run this command:



                                                  npm install --save @angular-devkit/build-angular





                                                  share|improve this answer


























                                                  • npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

                                                    – asifaftab87
                                                    Mar 9 at 6:16














                                                  3












                                                  3








                                                  3







                                                  If the following command does not work,



                                                  npm install --save-dev @angular-devkit/build-angular


                                                  then move to the project folder and run this command:



                                                  npm install --save @angular-devkit/build-angular





                                                  share|improve this answer















                                                  If the following command does not work,



                                                  npm install --save-dev @angular-devkit/build-angular


                                                  then move to the project folder and run this command:



                                                  npm install --save @angular-devkit/build-angular






                                                  share|improve this answer














                                                  share|improve this answer



                                                  share|improve this answer








                                                  edited Jun 27 '18 at 15:07









                                                  grg

                                                  2,49022034




                                                  2,49022034










                                                  answered May 20 '18 at 6:58









                                                  Murugaraju PerumallaMurugaraju Perumalla

                                                  293




                                                  293













                                                  • npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

                                                    – asifaftab87
                                                    Mar 9 at 6:16



















                                                  • npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

                                                    – asifaftab87
                                                    Mar 9 at 6:16

















                                                  npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

                                                  – asifaftab87
                                                  Mar 9 at 6:16





                                                  npm install --save @angular-devkit/build-angular worked for me but only problem was I was trying to run this command from a command prompt which was not run as an administrator, and I entered to execute this command it was not showing any error nothing only cursor was on wait state then I simply run a cmd with admin in it worked. Thanks

                                                  – asifaftab87
                                                  Mar 9 at 6:16











                                                  3














                                                  npm install
                                                  Just type npm install and run.Then the project will run without errors.
                                                  Or you can use npm install --save-dev @angular-devkit/build-angular






                                                  share|improve this answer




























                                                    3














                                                    npm install
                                                    Just type npm install and run.Then the project will run without errors.
                                                    Or you can use npm install --save-dev @angular-devkit/build-angular






                                                    share|improve this answer


























                                                      3












                                                      3








                                                      3







                                                      npm install
                                                      Just type npm install and run.Then the project will run without errors.
                                                      Or you can use npm install --save-dev @angular-devkit/build-angular






                                                      share|improve this answer













                                                      npm install
                                                      Just type npm install and run.Then the project will run without errors.
                                                      Or you can use npm install --save-dev @angular-devkit/build-angular







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Sep 1 '18 at 8:52









                                                      ThisuriThisuri

                                                      514




                                                      514























                                                          2














                                                          Need to explicitly get devDependencies.



                                                          npm i --only=dev





                                                          share|improve this answer



















                                                          • 1





                                                            This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                                                            – iizAck
                                                            Jan 11 at 13:58
















                                                          2














                                                          Need to explicitly get devDependencies.



                                                          npm i --only=dev





                                                          share|improve this answer



















                                                          • 1





                                                            This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                                                            – iizAck
                                                            Jan 11 at 13:58














                                                          2












                                                          2








                                                          2







                                                          Need to explicitly get devDependencies.



                                                          npm i --only=dev





                                                          share|improve this answer













                                                          Need to explicitly get devDependencies.



                                                          npm i --only=dev






                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Aug 10 '18 at 4:16









                                                          sachqsachq

                                                          1087




                                                          1087








                                                          • 1





                                                            This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                                                            – iizAck
                                                            Jan 11 at 13:58














                                                          • 1





                                                            This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                                                            – iizAck
                                                            Jan 11 at 13:58








                                                          1




                                                          1





                                                          This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                                                          – iizAck
                                                          Jan 11 at 13:58





                                                          This worked for me, same answer in: github.com/angular/angular-cli/issues/…

                                                          – iizAck
                                                          Jan 11 at 13:58











                                                          2














                                                          All of the above answer are correct but they did not work for me. The only way I was able to make this work was by follow steps/commands:



                                                          npm uninstall -g @angular/cli@6.0.8
                                                          npm cache clean --force
                                                          npm install -g @angular/cli@latest
                                                          npm install node-sass -g
                                                          ng new MY_PROJECT_NAME
                                                          cp -r from_my_old_project to_new_MY_PROJECT_NAME





                                                          share|improve this answer






























                                                            2














                                                            All of the above answer are correct but they did not work for me. The only way I was able to make this work was by follow steps/commands:



                                                            npm uninstall -g @angular/cli@6.0.8
                                                            npm cache clean --force
                                                            npm install -g @angular/cli@latest
                                                            npm install node-sass -g
                                                            ng new MY_PROJECT_NAME
                                                            cp -r from_my_old_project to_new_MY_PROJECT_NAME





                                                            share|improve this answer




























                                                              2












                                                              2








                                                              2







                                                              All of the above answer are correct but they did not work for me. The only way I was able to make this work was by follow steps/commands:



                                                              npm uninstall -g @angular/cli@6.0.8
                                                              npm cache clean --force
                                                              npm install -g @angular/cli@latest
                                                              npm install node-sass -g
                                                              ng new MY_PROJECT_NAME
                                                              cp -r from_my_old_project to_new_MY_PROJECT_NAME





                                                              share|improve this answer















                                                              All of the above answer are correct but they did not work for me. The only way I was able to make this work was by follow steps/commands:



                                                              npm uninstall -g @angular/cli@6.0.8
                                                              npm cache clean --force
                                                              npm install -g @angular/cli@latest
                                                              npm install node-sass -g
                                                              ng new MY_PROJECT_NAME
                                                              cp -r from_my_old_project to_new_MY_PROJECT_NAME






                                                              share|improve this answer














                                                              share|improve this answer



                                                              share|improve this answer








                                                              edited Oct 13 '18 at 17:09









                                                              Dinesh Pallapa

                                                              658816




                                                              658816










                                                              answered Jun 30 '18 at 6:11









                                                              grepitgrepit

                                                              9,69525854




                                                              9,69525854























                                                                  2














                                                                  I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.



                                                                  1. npm update -g @angular/cli

                                                                  2. editing my package.json changing the line
                                                                  "@angular/cli": "1.6.0",
                                                                  to
                                                                  "@angular/cli": "^1.6.0",

                                                                  3. npm update


                                                                  I hope my help is effective ツ






                                                                  share|improve this answer
























                                                                  • This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                                                                    – SanSolo
                                                                    Dec 20 '18 at 11:18
















                                                                  2














                                                                  I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.



                                                                  1. npm update -g @angular/cli

                                                                  2. editing my package.json changing the line
                                                                  "@angular/cli": "1.6.0",
                                                                  to
                                                                  "@angular/cli": "^1.6.0",

                                                                  3. npm update


                                                                  I hope my help is effective ツ






                                                                  share|improve this answer
























                                                                  • This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                                                                    – SanSolo
                                                                    Dec 20 '18 at 11:18














                                                                  2












                                                                  2








                                                                  2







                                                                  I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.



                                                                  1. npm update -g @angular/cli

                                                                  2. editing my package.json changing the line
                                                                  "@angular/cli": "1.6.0",
                                                                  to
                                                                  "@angular/cli": "^1.6.0",

                                                                  3. npm update


                                                                  I hope my help is effective ツ






                                                                  share|improve this answer













                                                                  I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.



                                                                  1. npm update -g @angular/cli

                                                                  2. editing my package.json changing the line
                                                                  "@angular/cli": "1.6.0",
                                                                  to
                                                                  "@angular/cli": "^1.6.0",

                                                                  3. npm update


                                                                  I hope my help is effective ツ







                                                                  share|improve this answer












                                                                  share|improve this answer



                                                                  share|improve this answer










                                                                  answered Dec 20 '18 at 10:58







                                                                  user10780188




















                                                                  • This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                                                                    – SanSolo
                                                                    Dec 20 '18 at 11:18



















                                                                  • This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                                                                    – SanSolo
                                                                    Dec 20 '18 at 11:18

















                                                                  This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                                                                  – SanSolo
                                                                  Dec 20 '18 at 11:18





                                                                  This has nothing to do with not being able to find a module. this just means the angular cli module will be updated for any version 1.6.x

                                                                  – SanSolo
                                                                  Dec 20 '18 at 11:18











                                                                  1














                                                                  When we run commands like ng serve, it uses the local version of @angular/cli. So first install latest version of @angular/cli locally (without the -g flag). Then update the cli using ng update @angular/cli command. I thing this should fix the issue. Thanks



                                                                  This link may help you if you are updating your angular project https://update.angular.io/






                                                                  share|improve this answer




























                                                                    1














                                                                    When we run commands like ng serve, it uses the local version of @angular/cli. So first install latest version of @angular/cli locally (without the -g flag). Then update the cli using ng update @angular/cli command. I thing this should fix the issue. Thanks



                                                                    This link may help you if you are updating your angular project https://update.angular.io/






                                                                    share|improve this answer


























                                                                      1












                                                                      1








                                                                      1







                                                                      When we run commands like ng serve, it uses the local version of @angular/cli. So first install latest version of @angular/cli locally (without the -g flag). Then update the cli using ng update @angular/cli command. I thing this should fix the issue. Thanks



                                                                      This link may help you if you are updating your angular project https://update.angular.io/






                                                                      share|improve this answer













                                                                      When we run commands like ng serve, it uses the local version of @angular/cli. So first install latest version of @angular/cli locally (without the -g flag). Then update the cli using ng update @angular/cli command. I thing this should fix the issue. Thanks



                                                                      This link may help you if you are updating your angular project https://update.angular.io/







                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      answered Oct 4 '18 at 6:09









                                                                      Tibin ThomasTibin Thomas

                                                                      1549




                                                                      1549























                                                                          0














                                                                          running the following worked for me
                                                                          npm audit fix --force






                                                                          share|improve this answer




























                                                                            0














                                                                            running the following worked for me
                                                                            npm audit fix --force






                                                                            share|improve this answer


























                                                                              0












                                                                              0








                                                                              0







                                                                              running the following worked for me
                                                                              npm audit fix --force






                                                                              share|improve this answer













                                                                              running the following worked for me
                                                                              npm audit fix --force







                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Aug 18 '18 at 0:51









                                                                              Geared4ITGeared4IT

                                                                              263




                                                                              263























                                                                                  0














                                                                                  add @angular-devkit/build-angular under your dev dependency and it will work, or you can also execute




                                                                                  npm install --save-dev @angular-devkit/build-angular







                                                                                  share|improve this answer




























                                                                                    0














                                                                                    add @angular-devkit/build-angular under your dev dependency and it will work, or you can also execute




                                                                                    npm install --save-dev @angular-devkit/build-angular







                                                                                    share|improve this answer


























                                                                                      0












                                                                                      0








                                                                                      0







                                                                                      add @angular-devkit/build-angular under your dev dependency and it will work, or you can also execute




                                                                                      npm install --save-dev @angular-devkit/build-angular







                                                                                      share|improve this answer













                                                                                      add @angular-devkit/build-angular under your dev dependency and it will work, or you can also execute




                                                                                      npm install --save-dev @angular-devkit/build-angular








                                                                                      share|improve this answer












                                                                                      share|improve this answer



                                                                                      share|improve this answer










                                                                                      answered Sep 8 '18 at 3:01









                                                                                      Mohit JainMohit Jain

                                                                                      30117




                                                                                      30117























                                                                                          0














                                                                                          Delete package-lock.json and do npm install again. It should fix the issue.



                                                                                          ** This fix is more suitable when you have created Angular 6 app using ng new and after installing other dependencies you find this error.






                                                                                          share|improve this answer




























                                                                                            0














                                                                                            Delete package-lock.json and do npm install again. It should fix the issue.



                                                                                            ** This fix is more suitable when you have created Angular 6 app using ng new and after installing other dependencies you find this error.






                                                                                            share|improve this answer


























                                                                                              0












                                                                                              0








                                                                                              0







                                                                                              Delete package-lock.json and do npm install again. It should fix the issue.



                                                                                              ** This fix is more suitable when you have created Angular 6 app using ng new and after installing other dependencies you find this error.






                                                                                              share|improve this answer













                                                                                              Delete package-lock.json and do npm install again. It should fix the issue.



                                                                                              ** This fix is more suitable when you have created Angular 6 app using ng new and after installing other dependencies you find this error.







                                                                                              share|improve this answer












                                                                                              share|improve this answer



                                                                                              share|improve this answer










                                                                                              answered Sep 8 '18 at 21:17









                                                                                              Rut ShahRut Shah

                                                                                              1634




                                                                                              1634























                                                                                                  0














                                                                                                  Try this one.



                                                                                                  npm install

                                                                                                  npm update

                                                                                                  if it's shows something like this.



                                                                                                  run npm audit fix to fix them, or npm audit for details




                                                                                                  Do that!






                                                                                                  share|improve this answer




























                                                                                                    0














                                                                                                    Try this one.



                                                                                                    npm install

                                                                                                    npm update

                                                                                                    if it's shows something like this.



                                                                                                    run npm audit fix to fix them, or npm audit for details




                                                                                                    Do that!






                                                                                                    share|improve this answer


























                                                                                                      0












                                                                                                      0








                                                                                                      0







                                                                                                      Try this one.



                                                                                                      npm install

                                                                                                      npm update

                                                                                                      if it's shows something like this.



                                                                                                      run npm audit fix to fix them, or npm audit for details




                                                                                                      Do that!






                                                                                                      share|improve this answer













                                                                                                      Try this one.



                                                                                                      npm install

                                                                                                      npm update

                                                                                                      if it's shows something like this.



                                                                                                      run npm audit fix to fix them, or npm audit for details




                                                                                                      Do that!







                                                                                                      share|improve this answer












                                                                                                      share|improve this answer



                                                                                                      share|improve this answer










                                                                                                      answered Sep 13 '18 at 1:46









                                                                                                      ElshanElshan

                                                                                                      3,82124077




                                                                                                      3,82124077























                                                                                                          0














                                                                                                          In my case, the issue is because of missing dependencies. Why dependencies is missing, because I've forgotten to call:



                                                                                                          npm install



                                                                                                          After calling the above command, all required dependencies are loaded in node_modules, and that is no more issue






                                                                                                          share|improve this answer




























                                                                                                            0














                                                                                                            In my case, the issue is because of missing dependencies. Why dependencies is missing, because I've forgotten to call:



                                                                                                            npm install



                                                                                                            After calling the above command, all required dependencies are loaded in node_modules, and that is no more issue






                                                                                                            share|improve this answer


























                                                                                                              0












                                                                                                              0








                                                                                                              0







                                                                                                              In my case, the issue is because of missing dependencies. Why dependencies is missing, because I've forgotten to call:



                                                                                                              npm install



                                                                                                              After calling the above command, all required dependencies are loaded in node_modules, and that is no more issue






                                                                                                              share|improve this answer













                                                                                                              In my case, the issue is because of missing dependencies. Why dependencies is missing, because I've forgotten to call:



                                                                                                              npm install



                                                                                                              After calling the above command, all required dependencies are loaded in node_modules, and that is no more issue







                                                                                                              share|improve this answer












                                                                                                              share|improve this answer



                                                                                                              share|improve this answer










                                                                                                              answered Nov 22 '18 at 21:03









                                                                                                              Chi Cuong LeChi Cuong Le

                                                                                                              675




                                                                                                              675























                                                                                                                  0














                                                                                                                  Following commands works 
                                                                                                                  npm install
                                                                                                                  ng update
                                                                                                                  -You may see the message "We analyzed your package.json and everything seems to be in order. Good work!"
                                                                                                                  npm update

                                                                                                                  Then try dev build
                                                                                                                  ng build
                                                                                                                  I got the error with type script, downgraded to
                                                                                                                  npm install typescript@">=3.1.1 <3.2

                                                                                                                  ng build --prod

                                                                                                                  All success with prod build.

                                                                                                                  Below is the working combination

                                                                                                                  ng --version

                                                                                                                  Package Version
                                                                                                                  -----------------------------------------------------------
                                                                                                                  @angular-devkit/architect 0.11.0
                                                                                                                  @angular-devkit/build-angular 0.11.0
                                                                                                                  @angular-devkit/build-optimizer 0.11.0
                                                                                                                  @angular-devkit/build-webpack 0.11.0
                                                                                                                  @angular-devkit/core 7.1.0
                                                                                                                  @angular-devkit/schematics 7.1.0
                                                                                                                  @angular/cli 7.1.0
                                                                                                                  @ngtools/webpack 7.1.0
                                                                                                                  @schematics/angular 7.1.0
                                                                                                                  @schematics/update 0.11.0
                                                                                                                  rxjs 6.3.3
                                                                                                                  typescript 3.1.6
                                                                                                                  webpack 4.23.1





                                                                                                                  share|improve this answer




























                                                                                                                    0














                                                                                                                    Following commands works 
                                                                                                                    npm install
                                                                                                                    ng update
                                                                                                                    -You may see the message "We analyzed your package.json and everything seems to be in order. Good work!"
                                                                                                                    npm update

                                                                                                                    Then try dev build
                                                                                                                    ng build
                                                                                                                    I got the error with type script, downgraded to
                                                                                                                    npm install typescript@">=3.1.1 <3.2

                                                                                                                    ng build --prod

                                                                                                                    All success with prod build.

                                                                                                                    Below is the working combination

                                                                                                                    ng --version

                                                                                                                    Package Version
                                                                                                                    -----------------------------------------------------------
                                                                                                                    @angular-devkit/architect 0.11.0
                                                                                                                    @angular-devkit/build-angular 0.11.0
                                                                                                                    @angular-devkit/build-optimizer 0.11.0
                                                                                                                    @angular-devkit/build-webpack 0.11.0
                                                                                                                    @angular-devkit/core 7.1.0
                                                                                                                    @angular-devkit/schematics 7.1.0
                                                                                                                    @angular/cli 7.1.0
                                                                                                                    @ngtools/webpack 7.1.0
                                                                                                                    @schematics/angular 7.1.0
                                                                                                                    @schematics/update 0.11.0
                                                                                                                    rxjs 6.3.3
                                                                                                                    typescript 3.1.6
                                                                                                                    webpack 4.23.1





                                                                                                                    share|improve this answer


























                                                                                                                      0












                                                                                                                      0








                                                                                                                      0







                                                                                                                      Following commands works 
                                                                                                                      npm install
                                                                                                                      ng update
                                                                                                                      -You may see the message "We analyzed your package.json and everything seems to be in order. Good work!"
                                                                                                                      npm update

                                                                                                                      Then try dev build
                                                                                                                      ng build
                                                                                                                      I got the error with type script, downgraded to
                                                                                                                      npm install typescript@">=3.1.1 <3.2

                                                                                                                      ng build --prod

                                                                                                                      All success with prod build.

                                                                                                                      Below is the working combination

                                                                                                                      ng --version

                                                                                                                      Package Version
                                                                                                                      -----------------------------------------------------------
                                                                                                                      @angular-devkit/architect 0.11.0
                                                                                                                      @angular-devkit/build-angular 0.11.0
                                                                                                                      @angular-devkit/build-optimizer 0.11.0
                                                                                                                      @angular-devkit/build-webpack 0.11.0
                                                                                                                      @angular-devkit/core 7.1.0
                                                                                                                      @angular-devkit/schematics 7.1.0
                                                                                                                      @angular/cli 7.1.0
                                                                                                                      @ngtools/webpack 7.1.0
                                                                                                                      @schematics/angular 7.1.0
                                                                                                                      @schematics/update 0.11.0
                                                                                                                      rxjs 6.3.3
                                                                                                                      typescript 3.1.6
                                                                                                                      webpack 4.23.1





                                                                                                                      share|improve this answer













                                                                                                                      Following commands works 
                                                                                                                      npm install
                                                                                                                      ng update
                                                                                                                      -You may see the message "We analyzed your package.json and everything seems to be in order. Good work!"
                                                                                                                      npm update

                                                                                                                      Then try dev build
                                                                                                                      ng build
                                                                                                                      I got the error with type script, downgraded to
                                                                                                                      npm install typescript@">=3.1.1 <3.2

                                                                                                                      ng build --prod

                                                                                                                      All success with prod build.

                                                                                                                      Below is the working combination

                                                                                                                      ng --version

                                                                                                                      Package Version
                                                                                                                      -----------------------------------------------------------
                                                                                                                      @angular-devkit/architect 0.11.0
                                                                                                                      @angular-devkit/build-angular 0.11.0
                                                                                                                      @angular-devkit/build-optimizer 0.11.0
                                                                                                                      @angular-devkit/build-webpack 0.11.0
                                                                                                                      @angular-devkit/core 7.1.0
                                                                                                                      @angular-devkit/schematics 7.1.0
                                                                                                                      @angular/cli 7.1.0
                                                                                                                      @ngtools/webpack 7.1.0
                                                                                                                      @schematics/angular 7.1.0
                                                                                                                      @schematics/update 0.11.0
                                                                                                                      rxjs 6.3.3
                                                                                                                      typescript 3.1.6
                                                                                                                      webpack 4.23.1






                                                                                                                      share|improve this answer












                                                                                                                      share|improve this answer



                                                                                                                      share|improve this answer










                                                                                                                      answered Dec 3 '18 at 16:58









                                                                                                                      Pushpinder SinghPushpinder Singh

                                                                                                                      111




                                                                                                                      111























                                                                                                                          0














                                                                                                                          Solution



                                                                                                                          Execute below Command on your CLI :




                                                                                                                          • npm install






                                                                                                                          share|improve this answer




























                                                                                                                            0














                                                                                                                            Solution



                                                                                                                            Execute below Command on your CLI :




                                                                                                                            • npm install






                                                                                                                            share|improve this answer


























                                                                                                                              0












                                                                                                                              0








                                                                                                                              0







                                                                                                                              Solution



                                                                                                                              Execute below Command on your CLI :




                                                                                                                              • npm install






                                                                                                                              share|improve this answer













                                                                                                                              Solution



                                                                                                                              Execute below Command on your CLI :




                                                                                                                              • npm install







                                                                                                                              share|improve this answer












                                                                                                                              share|improve this answer



                                                                                                                              share|improve this answer










                                                                                                                              answered Feb 6 at 6:34









                                                                                                                              Abdullah PariyaniAbdullah Pariyani

                                                                                                                              14310




                                                                                                                              14310























                                                                                                                                  0















                                                                                                                                  • Delete the node_modules.

                                                                                                                                  • Clear the cache using'npm cache clean --verify'.

                                                                                                                                  • And then npm install again.


                                                                                                                                  Works like a charm for me.






                                                                                                                                  share|improve this answer




























                                                                                                                                    0















                                                                                                                                    • Delete the node_modules.

                                                                                                                                    • Clear the cache using'npm cache clean --verify'.

                                                                                                                                    • And then npm install again.


                                                                                                                                    Works like a charm for me.






                                                                                                                                    share|improve this answer


























                                                                                                                                      0












                                                                                                                                      0








                                                                                                                                      0








                                                                                                                                      • Delete the node_modules.

                                                                                                                                      • Clear the cache using'npm cache clean --verify'.

                                                                                                                                      • And then npm install again.


                                                                                                                                      Works like a charm for me.






                                                                                                                                      share|improve this answer














                                                                                                                                      • Delete the node_modules.

                                                                                                                                      • Clear the cache using'npm cache clean --verify'.

                                                                                                                                      • And then npm install again.


                                                                                                                                      Works like a charm for me.







                                                                                                                                      share|improve this answer












                                                                                                                                      share|improve this answer



                                                                                                                                      share|improve this answer










                                                                                                                                      answered Feb 26 at 12:04









                                                                                                                                      Arslan MirArslan Mir

                                                                                                                                      15




                                                                                                                                      15























                                                                                                                                          -1














                                                                                                                                          I am facing the same issue since 2 days.



                                                                                                                                          ng -v :6.0.8
                                                                                                                                          node -v :8.11.2
                                                                                                                                          npm -v :6.1.0


                                                                                                                                          Make sure you are in the folder where angular.json is installed. Get into that and type ng serve. If the issue still arises, then you are having only dependencies installed in node_modules. Type the following, and it will work:



                                                                                                                                          npm i --only=dev





                                                                                                                                          share|improve this answer






























                                                                                                                                            -1














                                                                                                                                            I am facing the same issue since 2 days.



                                                                                                                                            ng -v :6.0.8
                                                                                                                                            node -v :8.11.2
                                                                                                                                            npm -v :6.1.0


                                                                                                                                            Make sure you are in the folder where angular.json is installed. Get into that and type ng serve. If the issue still arises, then you are having only dependencies installed in node_modules. Type the following, and it will work:



                                                                                                                                            npm i --only=dev





                                                                                                                                            share|improve this answer




























                                                                                                                                              -1












                                                                                                                                              -1








                                                                                                                                              -1







                                                                                                                                              I am facing the same issue since 2 days.



                                                                                                                                              ng -v :6.0.8
                                                                                                                                              node -v :8.11.2
                                                                                                                                              npm -v :6.1.0


                                                                                                                                              Make sure you are in the folder where angular.json is installed. Get into that and type ng serve. If the issue still arises, then you are having only dependencies installed in node_modules. Type the following, and it will work:



                                                                                                                                              npm i --only=dev





                                                                                                                                              share|improve this answer















                                                                                                                                              I am facing the same issue since 2 days.



                                                                                                                                              ng -v :6.0.8
                                                                                                                                              node -v :8.11.2
                                                                                                                                              npm -v :6.1.0


                                                                                                                                              Make sure you are in the folder where angular.json is installed. Get into that and type ng serve. If the issue still arises, then you are having only dependencies installed in node_modules. Type the following, and it will work:



                                                                                                                                              npm i --only=dev






                                                                                                                                              share|improve this answer














                                                                                                                                              share|improve this answer



                                                                                                                                              share|improve this answer








                                                                                                                                              edited Jul 1 '18 at 17:48









                                                                                                                                              juzraai

                                                                                                                                              3,06981832




                                                                                                                                              3,06981832










                                                                                                                                              answered Jul 1 '18 at 13:31









                                                                                                                                              shivangi mehtashivangi mehta

                                                                                                                                              11




                                                                                                                                              11























                                                                                                                                                  -1














                                                                                                                                                  you npm version is old, try to run the following command:



                                                                                                                                                  npm i npm@latest -g





                                                                                                                                                  share|improve this answer






























                                                                                                                                                    -1














                                                                                                                                                    you npm version is old, try to run the following command:



                                                                                                                                                    npm i npm@latest -g





                                                                                                                                                    share|improve this answer




























                                                                                                                                                      -1












                                                                                                                                                      -1








                                                                                                                                                      -1







                                                                                                                                                      you npm version is old, try to run the following command:



                                                                                                                                                      npm i npm@latest -g





                                                                                                                                                      share|improve this answer















                                                                                                                                                      you npm version is old, try to run the following command:



                                                                                                                                                      npm i npm@latest -g






                                                                                                                                                      share|improve this answer














                                                                                                                                                      share|improve this answer



                                                                                                                                                      share|improve this answer








                                                                                                                                                      edited Jul 4 '18 at 9:20

























                                                                                                                                                      answered Jun 28 '18 at 2:38









                                                                                                                                                      qiulveluqiulvelu

                                                                                                                                                      93




                                                                                                                                                      93























                                                                                                                                                          -1














                                                                                                                                                          First set proxy if you are in a restricted environment
                                                                                                                                                          Then do






                                                                                                                                                          npm install





                                                                                                                                                          This will definitely work






                                                                                                                                                          share|improve this answer




























                                                                                                                                                            -1














                                                                                                                                                            First set proxy if you are in a restricted environment
                                                                                                                                                            Then do






                                                                                                                                                            npm install





                                                                                                                                                            This will definitely work






                                                                                                                                                            share|improve this answer


























                                                                                                                                                              -1












                                                                                                                                                              -1








                                                                                                                                                              -1







                                                                                                                                                              First set proxy if you are in a restricted environment
                                                                                                                                                              Then do






                                                                                                                                                              npm install





                                                                                                                                                              This will definitely work






                                                                                                                                                              share|improve this answer













                                                                                                                                                              First set proxy if you are in a restricted environment
                                                                                                                                                              Then do






                                                                                                                                                              npm install





                                                                                                                                                              This will definitely work






                                                                                                                                                              npm install





                                                                                                                                                              npm install






                                                                                                                                                              share|improve this answer












                                                                                                                                                              share|improve this answer



                                                                                                                                                              share|improve this answer










                                                                                                                                                              answered Jul 30 '18 at 7:10









                                                                                                                                                              suraj garlasuraj garla

                                                                                                                                                              6715




                                                                                                                                                              6715























                                                                                                                                                                  -1















                                                                                                                                                                  Simple solution




                                                                                                                                                                  Hit below commend only to fix this error



                                                                                                                                                                  npm install --save-dev @angular-devkit/build-angular





                                                                                                                                                                  share|improve this answer




























                                                                                                                                                                    -1















                                                                                                                                                                    Simple solution




                                                                                                                                                                    Hit below commend only to fix this error



                                                                                                                                                                    npm install --save-dev @angular-devkit/build-angular





                                                                                                                                                                    share|improve this answer


























                                                                                                                                                                      -1












                                                                                                                                                                      -1








                                                                                                                                                                      -1








                                                                                                                                                                      Simple solution




                                                                                                                                                                      Hit below commend only to fix this error



                                                                                                                                                                      npm install --save-dev @angular-devkit/build-angular





                                                                                                                                                                      share|improve this answer














                                                                                                                                                                      Simple solution




                                                                                                                                                                      Hit below commend only to fix this error



                                                                                                                                                                      npm install --save-dev @angular-devkit/build-angular






                                                                                                                                                                      share|improve this answer












                                                                                                                                                                      share|improve this answer



                                                                                                                                                                      share|improve this answer










                                                                                                                                                                      answered Aug 14 '18 at 13:04









                                                                                                                                                                      ngCoursengCourse

                                                                                                                                                                      902711




                                                                                                                                                                      902711






























                                                                                                                                                                          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%2f50333003%2fcould-not-find-module-angular-devkit-build-angular%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







                                                                                                                                                                          這個網誌中的熱門文章

                                                                                                                                                                          Xamarin.form Move up view when keyboard appear

                                                                                                                                                                          Post-Redirect-Get with Spring WebFlux and Thymeleaf

                                                                                                                                                                          Anylogic : not able to use stopDelay()