首页 \ 问答 \ angular 2示例webpack项目无法加载webpack-dev-server(angular 2 sample webpack project fails to load webpack-dev-server)

angular 2示例webpack项目无法加载webpack-dev-server(angular 2 sample webpack project fails to load webpack-dev-server)

我正试图从这里开始角度权威机构给出的项目

下载后,我运行npm install 。 然后我尝试用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

我的本地机器或其他什么问题?


I am trying to run the project given by angular authorities from here

After downloading , I run npm install . and then I tried to run server with npm start . But somehow it is giving me the following error:

                                              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

Is there any problem with my local machine or something else?


原文:https://stackoverflow.com/questions/46219588
更新时间:2022-05-27 06:05

最满意答案

您可以删除逗号,然后将值转换为数字数据类型:

DECLARE @Number VARCHAR(50);
SET @Number = '-128,533.74';

SELECT CONVERT(DECIMAL(16,4),REPLACE(@Number,',',''))

You can remove the comma and then convert the value to a numeric data type:

DECLARE @Number VARCHAR(50);
SET @Number = '-128,533.74';

SELECT CONVERT(DECIMAL(16,4),REPLACE(@Number,',',''))

相关问答

更多
  • 请参阅语言环境模块。 这是货币(和日期)格式。 >>> import locale >>> locale.setlocale( locale.LC_ALL, '' ) 'English_United States.1252' >>> locale.currency( 188518982.18 ) '$188518982.18' >>> locale.currency( 188518982.18, grouping=True ) '$188,518,982.18' See the locale module ...
  • 使用number_format非常简单: echo number_format($number, 2, ",", " "); This is quite easy with number_format: echo number_format($number, 2, ",", " ");
  • 试试这样吧 SELECT (CASE WHEN @val < 0 THEN '-' ELSE '' END)+ '$'+CONVERT(VARCHAR, ABS(CONVERT(MONEY, @val)), 1) Try like this SELECT (CASE WHEN @val < 0 THEN '-' ELSE '' END)+ '$'+CONVERT(VARCHAR, ABS(CONVERT(MONEY, @val)), 1)
  • 使用CASE表达式时,结果表达式数据类型将从一个转换为另一个数据类型 case when trandate between '2015-01-01' and '2015-03-31' then format(purchases, 'C', 'en-US') else 0 end 在上面的case表达式中,结果中有2种不同的数据类型。 一个是STRING,另一个是INTEGER。 SQL Server将字符串转换为整数。 它无法并且抛弃该错误。 您应该在前端应用程序中执行值 ...
  • 你可以尝试创建一个像这样的函数: function Currency(sSymbol, vValue) { aDigits = vValue.toFixed(2).split("."); aDigits[0] = aDigits[0].split("").reverse().join("").replace(/(\d{3})(?=\d)/g, "$1,").split("").reverse().join(""); return sSymbol + aDigits.join("."); } ...
  • 您可以删除逗号,然后将值转换为数字数据类型: DECLARE @Number VARCHAR(50); SET @Number = '-128,533.74'; SELECT CONVERT(DECIMAL(16,4),REPLACE(@Number,',','')) You can remove the comma and then convert the value to a numeric data type: DECLARE @Number VARCHAR(50); SET @Number = ...
  • 您可能想要使用NumberFormat.getCurrencyInstance() 。 这将返回一个NumberFormat对象,该对象使用默认Locale的标准货币表示形式(或者可选地,您传入的)。 要向右对齐,可以使用String.padLeft() 。 例: def formatter = java.text.NumberFormat.currencyInstance def values = [0, 100000000, 9123123.25, 10.20, 1907.23] def formatt ...
  • 确保edtZaklad的MaxLength为0。 var Form21: TForm21; Check:string; //to break the loop. function GetCurrency(Num: String):string; var i: Integer ; Str:String; zaklad: Currency; begin Result := ''; for i := 1 to length(Num) do begin if (Num[i] ...
  • 至少在.NET中,数字格式与文化有关,而不是符号。 默认货币符号是与该文化相关的主要货币符号。 符号可以根据需要重写。 就像你的例子一样,如果我在一个字符串中嵌入一个货币值,那么我使用该字符串的文化作为格式,但是适当地覆盖货币符号。 其余格式保持原样。 另一方面,如果我正在做一个报告,所有的值都使用相同的文化进行格式化。 在这种情况下,我通常使用ISO 3字符代码而不是货币符号,尤其是涉及超过2种货币时,以避免字体问题。 Ryan对另一个问题的回答描述了C#中货币格式化的最佳实践。 At least in ...
  • NumberFormat也适用于格式化货币(请参阅NumberFormat#getCurrencyInstance )。 因为你需要一个JFormattedTextField的Format ,我会从那里开始。 您可以将NumberFormat配置为允许十进制值,并在以后将代码转换为int而不会出现问题 The NumberFormat is also suited to format a currency (see NumberFormat#getCurrencyInstance). And since y ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)