title: Use Angular Cli with Webpack
body: <p>I am trying to incorporate cli generate commands in my angular2 project but it gives me a error</p>
  
  <p>I am using the angular2-webpack-starter from git </p>
  
  <p>You have to be inside an angular-cli project in order to use the generate command.</p>
  
  <p>I did npm install-g angular-cli</p>
  
  <p>also in my package.json there i have added the dependency but it dosent work,how to make it work</p>
  
  <p>My package.json</p>
  
  <pre><code>{
    "name": "angular2-webpack-starter",
    "version": "5.4.1",
    "description": "An Angular 2 Webpack Starter kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass",
    "keywords": [
      "angular2",
      "webpack",
      "typescript"
    ],
    "author": "Patrick Stapleton &lt;patrick@angularclass.com&gt;",
    "homepage": "https://github.com/angularclass/angular2-webpack-starter",
    "license": "MIT",
    "scripts": {
      "build:aot:prod": "npm run clean:dist &amp;&amp; npm run clean:aot &amp;&amp; webpack --config config/webpack.prod.js  --progress --profile --bail",
      "build:aot": "npm run build:aot:prod",
      "build:dev": "npm run clean:dist &amp;&amp; webpack --config config/webpack.dev.js --progress --profile",
      "build:docker": "npm run build:prod &amp;&amp; docker build -t angular2-webpack-start:latest .",
      "build:prod": "npm run clean:dist &amp;&amp; webpack --config config/webpack.prod.js  --progress --profile --bail",
      "build": "npm run build:dev",
      "ci:aot": "npm run lint &amp;&amp; npm run test &amp;&amp; npm run build:aot &amp;&amp; npm run e2e",
      "ci:jit": "npm run lint &amp;&amp; npm run test &amp;&amp; npm run build:prod &amp;&amp; npm run e2e",
      "ci:nobuild": "npm run lint &amp;&amp; npm test &amp;&amp; npm run e2e",
      "ci:testall": "npm run lint &amp;&amp; npm run test &amp;&amp; npm run build:prod &amp;&amp; npm run e2e &amp;&amp; npm run build:aot &amp;&amp; npm run e2e",
      "ci:travis": "npm run lint &amp;&amp; npm run test &amp;&amp; npm run build:dev &amp;&amp; npm run e2e:travis &amp;&amp; npm run build:prod &amp;&amp; npm run e2e:travis &amp;&amp; npm run build:aot &amp;&amp; npm run e2e:travis",
      "ci": "npm run ci:testall",
      "clean:dll": "npm run rimraf -- dll",
      "clean:aot": "npm run rimraf -- compiled",
      "clean:dist": "npm run rimraf -- dist",
      "clean:install": "npm set progress=false &amp;&amp; npm install",
      "clean": "npm cache clean &amp;&amp; npm run rimraf -- node_modules doc coverage dist compiled dll",
      "docker": "docker",
      "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
      "e2e:live": "npm-run-all -p -r server:prod:ci protractor:live",
      "e2e:travis": "npm-run-all -p -r server:prod:ci protractor:delay",
      "e2e": "npm-run-all -p -r server:prod:ci protractor",
      "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
      "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
      "github-deploy": "npm run github-deploy:dev",
      "lint": "npm run tslint \"src/**/*.ts\"",
      "postinstall": "npm run webdriver:update",
      "postversion": "git push &amp;&amp; git push --tags",
      "preclean:install": "npm run clean",
      "preversion": "npm test",
      "protractor": "protractor",
      "protractor:delay": "sleep 3 &amp;&amp; npm run protractor",
      "protractor:live": "protractor --elementExplorer",
      "rimraf": "rimraf",
      "server:dev:hmr": "npm run server:dev -- --inline --hot",
      "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/",
      "server:prod": "http-server dist -c-1 --cors",
      "server:prod:ci": "http-server dist -p 3000 -c-1 --cors",
      "server": "npm run server:dev",
      "start:hmr": "npm run server:dev:hmr",
      "start": "npm run server:dev",
      "test": "npm run lint &amp;&amp; karma start",
      "tslint": "tslint",
      "typedoc": "typedoc",
      "version": "npm run build",
      "watch:dev:hmr": "npm run watch:dev -- --hot",
      "watch:dev": "npm run build:dev -- --watch",
      "watch:prod": "npm run build:prod -- --watch",
      "watch:test": "npm run test -- --auto-watch --no-single-run",
      "watch": "npm run watch:dev",
      "webdriver-manager": "webdriver-manager",
      "webdriver:start": "npm run webdriver-manager start",
      "webdriver:update": "webdriver-manager update",
      "webpack-dev-server": "webpack-dev-server",
      "webpack": "webpack"
    },
    "dependencies": {
      "@angular/common": "~2.4.3",
      "@angular/compiler": "~2.4.3",
      "@angular/compiler-cli": "~2.4.3",
      "@angular/core": "~2.4.3",
      "@angular/forms": "~2.4.3",
      "@angular/http": "~2.4.3",
      "@angular/platform-browser": "~2.4.3",
      "@angular/platform-browser-dynamic": "~2.4.3",
      "@angular/platform-server": "~2.4.3",
      "@angular/router": "~3.4.3",
      "@angularclass/conventions-loader": "^1.0.2",
      "@angularclass/hmr": "~1.2.2",
      "@angularclass/hmr-loader": "~3.0.2",
      "core-js": "^2.4.1",
      "http-server": "^0.9.0",
      "ie-shim": "^0.1.0",
      "jasmine-core": "^2.5.2",
      "reflect-metadata": "^0.1.9",
      "rxjs": "~5.0.2",
      "zone.js": "~0.7.4"
    },
    "devDependencies": {
  
      "@types/hammerjs": "^2.0.33",
      "@types/jasmine": "^2.2.34",
      "@types/node": "^7.0.0",
      "@types/selenium-webdriver": "~2.53.39",
      "@types/source-map": "^0.5.0",
      "@types/uglify-js": "^2.0.27",
      "@types/webpack": "^2.0.0",
      "add-asset-html-webpack-plugin": "^1.0.2",
      "angular2-template-loader": "^0.6.0",
      "assets-webpack-plugin": "^3.4.0",
      "awesome-typescript-loader": "~3.0.0-beta.18",
      "codelyzer": "~2.0.0-beta.4",
      "copy-webpack-plugin": "^4.0.0",
      "css-loader": "^0.26.0",
      "exports-loader": "^0.6.3",
      "expose-loader": "^0.7.1",
      "extract-text-webpack-plugin": "~2.0.0-beta.4",
      "file-loader": "^0.9.0",
      "find-root": "^1.0.0",
      "gh-pages": "^0.12.0",
      "html-webpack-plugin": "^2.21.0",
      "imports-loader": "^0.7.0",
      "istanbul-instrumenter-loader": "1.2.0",
      "jasmine-core": "^2.5.2",
      "json-loader": "^0.5.4",
      "karma": "^1.2.0",
      "karma-chrome-launcher": "^2.0.0",
      "karma-coverage": "^1.1.1",
      "karma-jasmine": "^1.0.2",
      "karma-mocha-reporter": "^2.0.0",
      "karma-remap-coverage": "^0.1.4",
      "karma-sourcemap-loader": "^0.3.7",
      "karma-webpack": "2.0.1",
      "ng-router-loader": "^1.0.2",
      "ngc-webpack": "1.1.0",
      "node-sass": "^4.2.0",
      "npm-run-all": "^4.0.0",
      "parse5": "^3.0.1",
      "protractor": "^4.0.14",
      "raw-loader": "0.5.1",
      "rimraf": "~2.5.4",
      "sass-loader": "^4.1.1",
      "script-ext-html-webpack-plugin": "^1.3.2",
      "source-map-loader": "^0.1.5",
      "string-replace-loader": "1.0.5",
      "style-loader": "^0.13.1",
      "to-string-loader": "^1.1.4",
      "ts-helpers": "1.1.2",
      "ts-node": "^2.0.0",
      "tslint": "~4.3.1",
      "typedoc": "^0.5.3",
      "typescript": "~2.1.5",
      "url-loader": "^0.5.7",
      "v8-lazy-parse-webpack-plugin": "^0.3.0",
      "webpack": "2.2.0",
      "webpack-dev-middleware": "^1.9.0",
      "webpack-dev-server": "2.2.0",
      "webpack-dll-bundles-plugin": "^1.0.0-beta.5",
      "webpack-md5-hash": "^0.0.5",
      "webpack-merge": "~2.4.0"
    },
    "repository": {
      "type": "git",
      "url": "https://github.com/angularclass/angular2-webpack-starter.git"
    },
    "bugs": {
      "url": "https://github.com/angularclass/angular2-webpack-starter/issues"
    },
    "engines": {
      "node": "&gt;= 4.2.1",
      "npm": "&gt;= 3"
    }
  }
  </code></pre>