3

I'm creating a ASP.NET Core 2.0 MVC application and integrating with Angular 4. I created a NPM package configuration file called package.json and saved in the root folder.

I don't want to use angular-cli, but use Gulp to compile and bundle the angular files.

I'm getting errors when the Visual Studio 2017 install the packages. Should I use devDependencies or dependencies in the package.json file.

{ "version": "1.0.0", "name": "asp.net", "private": true, "dependencies": { "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/router": "^4.2.4", "core-js": "^2.4.1", "gulp": "^3.9.1", "gulp-babel": "7.0.0", "gulp-concat": "2.6.1", "gulp-sourcemaps": "2.6.1", "gulp-typescript": "3.2.1", "minimatch": "3.0.4", "minimist": "1.2.0", "rimraf": "2.6.1", "require-dir": "0.3.2", "rxjs": "^5.4.2", "systemjs-builder": "0.16.9", "zone.js": "^0.8.14", "typescript": "2.4.2" }, "devDependencies": { "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/router": "^4.2.4", "core-js": "^2.4.1", "gulp": "^3.9.1", "gulp-babel": "7.0.0", "gulp-concat": "2.6.1", "gulp-sourcemaps": "2.6.1", "gulp-typescript": "3.2.1", "minimatch": "3.0.4", "minimist": "1.2.0", "rimraf": "2.6.1", "require-dir": "0.3.2", "rxjs": "^5.4.2", "systemjs-builder": "0.16.9", "zone.js": "^0.8.14", "typescript": "2.4.2" } }

wonderful world
  • 10,969
  • 20
  • 97
  • 194

1 Answers1

3

the short answer is you should use both, dependencies for UI libraries that you want to bundle, and devDependencies for those that allow you to develop the app.

there's an awesome explanation in this post: https://stackoverflow.com/a/22004559/1303897

Sonicd300
  • 1,950
  • 1
  • 16
  • 22