首页
\
问答
\
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,',',''))
相关问答
更多-
在Python中的货币格式化(Currency formatting in Python)[2023-08-02]
请参阅语言环境模块。 这是货币(和日期)格式。 >>> 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 ... -
格式化数字(Formatting a number)[2022-09-19]
使用number_format非常简单: echo number_format($number, 2, ",", " "); This is quite easy with number_format: echo number_format($number, 2, ",", " "); -
在格式化货币时,如何在SQL查询中在' - '后添加'$'(How to add '$' after '-' in SQL Query when formatting for currency)[2022-02-13]
试试这样吧 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) -
SQL货币格式(SQL Currency Formatting)[2022-10-23]
使用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 = ...
-
Groovy货币格式(Groovy currency formatting)[2022-11-27]
您可能想要使用NumberFormat.getCurrencyInstance() 。 这将返回一个NumberFormat对象,该对象使用默认Locale的标准货币表示形式(或者可选地,您传入的)。 要向右对齐,可以使用String.padLeft() 。 例: def formatter = java.text.NumberFormat.currencyInstance def values = [0, 100000000, 9123123.25, 10.20, 1907.23] def formatt ... -
使用Delphi进行货币格式化(Currency Formatting with Delphi)[2023-09-27]
确保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 ...
-
在Java中格式化货币(Formatting currency in Java)[2022-04-24]
NumberFormat也适用于格式化货币(请参阅NumberFormat#getCurrencyInstance )。 因为你需要一个JFormattedTextField的Format ,我会从那里开始。 您可以将NumberFormat配置为允许十进制值,并在以后将代码转换为int而不会出现问题 The NumberFormat is also suited to format a currency (see NumberFormat#getCurrencyInstance). And since y ...