Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
angular 2示例网页包项目无法加载网页包开发服务器_Angular_Webpack_Webpack Dev Server - Fatal编程技术网

angular 2示例网页包项目无法加载网页包开发服务器

angular 2示例网页包项目无法加载网页包开发服务器,angular,webpack,webpack-dev-server,Angular,Webpack,Webpack Dev Server,我正试图运行的项目所给予的角度当局从 下载后,我运行npm安装。然后我尝试使用npm start运行服务器。但不知何故,它给了我以下错误: Asset Size Chunks Chunk Names assets/angular.72e938844d7d3f68edf83a97e34f0859.png 4.45 kB [emit

我正试图运行的项目所给予的角度当局从

下载后,我运行npm安装。然后我尝试使用npm start运行服务器。但不知何故,它给了我以下错误:

                                              Asset       Size  Chunks                    Chunk Names
assets/angular.72e938844d7d3f68edf83a97e34f0859.png    4.45 kB          [emitted]
                     vendor.23469b081171ef5c7a6b.js    1.01 MB       0  [emitted]  [big]  vendor
                        app.23469b081171ef5c7a6b.js    1.87 kB       1  [emitted]         app
                  polyfills.23469b081171ef5c7a6b.js     117 kB       2  [emitted]         polyfills
                       app.23469b081171ef5c7a6b.css  107 bytes       1  [emitted]         app
                   app.23469b081171ef5c7a6b.css.map  312 bytes       1  [emitted]         app
                                         index.html  555 bytes          [emitted]
  [23] ./~/@angular/core/@angular/core.es5.js 490 kB {0} [built]
  [58] ./~/@angular/platform-browser/@angular/platform-browser.es5.js 141 kB {0} [built]
  [71] ./~/@angular/common/@angular/common.es5.js 132 kB {0} [built]
  [92] ./~/@angular/platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js 5.88 kB {0} [built]
 [193] ./~/@angular/http/@angular/http.es5.js 74.6 kB {0} [built]
 [194] ./~/@angular/router/@angular/router.es5.js 220 kB {0} [built]
 [195] ./src/app/app.module.ts 1.22 kB {1} [built]
 [196] ./~/core-js/es6/index.js 5.88 kB {2} [built]
 [197] ./~/core-js/es7/reflect.js 510 bytes {2} [built]
 [198] ./~/rxjs/Rx.js 9.65 kB {0} [built]
 [199] ./~/zone.js/dist/zone.js 119 kB {2} [built]
 [318] ./~/core-js/modules/es6.string.fixed.js 189 bytes {2} [built]
 [631] ./src/main.ts 416 bytes {1} [built]
 [632] ./src/polyfills.ts 365 bytes {2} [built]
 [633] ./src/vendor.ts 416 bytes {0} [built]
    + 622 hidden modules
Child html-webpack-plugin for "index.html":
       [0] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 301 bytes {0} [built]
Child extract-text-webpack-plugin:
       [0] ./~/css-loader/lib/css-base.js 1.46 kB {0} [built]
       [1] ./~/css-loader?sourceMap!./src/assets/css/styles.css 463 bytes {0} [built]

> angular-io-example@1.0.0 start C:\Users\anand\webpack
> webpack-dev-server --inline --progress --port 8080

 10% building modules 3/3 modules 0 activeevents.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EACCES 127.0.0.1:8080
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at Server._listen2 (net.js:1244:19)
    at listen (net.js:1293:10)
    at net.js:1403:9
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! angular-io-example@1.0.0 start: `webpack-dev-server --inline --progress --port 8080`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-io-example@1.0.0 start script 'webpack-dev-server --inline --progress --port 8080'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-io-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --inline --progress --port 8080
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-io-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-io-example
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\anand\webpack\npm-debug.log

我的本地计算机或其他设备有问题吗?

在本地计算机上,在端口8080上运行其他设备,请更改package.json文件端口

"scripts": {
"start": "webpack-dev-server --inline --progress --port 4200",
"test": "karma start", ...

您有javascript错误:thrower;//未处理的“错误”事件我没有修改代码,我刚刚运行了教程中给出的项目。我认为这与权限问题有关,可能是您的8080端口已被其他系统服务使用。试着换个颜色port@ArunRedhu我把端口改为8000,它成功了