Tag: angular cli

ng服务抛出未处理的错误事件

所以当我尝试运行ng服务时,我刚启动了一个新的angular-cli项目,我得到了Unhandeled Error事件。 我目前正在运行节点v7.1.0。 我正在关注黑客新闻的教程。 https://houssein.me/angular2-hacker-news我安装了angular-cli global。 所以一切都很顺利,只是ng服务命令没有 events.js:160 throw er; // Unhandled 'error' event ^ Error: write EINVAL at exports._errnoException (util.js:1022:11) at WriteStream.Socket._writeGeneric (net.js:715:26) at WriteStream.Socket._write (net.js:734:8) at doWrite (_stream_writable.js:334:12) at writeOrBuffer (_stream_writable.js:320:5) at WriteStream.Writable.write (_stream_writable.js:247:11) at WriteStream.Socket.write (net.js:661:40) at defaultHandler (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2- hn\node_modules\webpack\lib\ProgressPlugin.js:175:18) at Compiler.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\ProgressPlugin.js:130:4) at Compiler.applyPlugins (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\tapable\lib\Tapable.js:25:14) at Watching._done (D:\2MCT-Web-UX\Web-Front-End\P2\Angular […]

Angular 2-Angular cli – build立项目

我是Angular 2的新手。 我开发了一个小项目,使用angular-cli生成包装,成功生成dist文件夹。 但是当我部署这个应用程序到服务器,并点击index.html页面,页面无法访问捆绑js文件。 捆绑后的Index.html :: <head> <meta charset="utf-8"> <title>MyApp</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!– Latest compiled and minified JavaScript –> <script src="//rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.js"></script> <link href="styles.d41d8cd98f00b204e9800998ecf8427e.bundle.css" rel="stylesheet"></head> <body> <app-root>Loading…</app-root> <script type="text/javascript" src="inline.d41d8cd98f00b204e980.bundle.js"></script><script type="text/javascript" src="styles.b2328beb0372c051d06d.bundle.js"></script><script type="text/javascript" src="main.83a76acd0c370402d4d0.bundle.js"></script></body> angularcli.js { "project": { […]

SyntaxError:意外的令牌angular度

正在使用的节点版本: v5.7.0 。 尝试安装/升级angular-cli到最新版本以支持: angular-4 按照节点团队的推荐,使用powershell将npm升级到最新版本。 升级后使用的npm版本是: 4.5.0 (最新) 后来尝试使用: npm install -g @angular/cli来安装angular- npm install -g @angular/cli 最后除了两个警告,一切安装成功 但是,当我只是键入ng或ng help :我得到错误: SyntaxError: Unexpected token =指向构造函数中的fallbacks参数,如下所示: 我们应该更新节点版本,而不是只升级npm : https : //github.com/angular/angular-cli#prerequisites ? 或者我错过了什么?

安装angular / cli时出错 – 找不到:python2

我试图用这个命令安装“npm install -g @ angular / cli”。 但我总是得到错误“错误:找不到:python2” 有什么我在这里失踪?

为什么node-npm在安装@ angular / cli时失败,校验和失败?

我正在使用节点v6.11.5和npm 3.10.10和64位操作系统,并安装@ angular / cli时我收到以下错误: C:\WINDOWS\system32>npm install -g @angular/cli npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! shasum check failed for C:\Users\Shubham\AppData\Local\Temp\npm-6192-9e acb63c\registry.npmjs.org\rxjs\-\rxjs-5.5.2.tgz npm ERR! Expected: 28d403f0071121967f18ad665563255d54236ac3 npm ERR! Actual: c2b697120c7dc0e6728da0e7636b90e15723cc24 npm ERR! From: http://registry.npmjs.org/rxjs/-/rxjs-5.5.2.tgz npm ERR! npm […]

无法迁移到angular度5angular度文件获取无效的错误

嗨,我已经创build了angular4.4.3angular应用程序下面是我的依赖 "dependencies": { "@angular/animations": "^4.4.3", "@angular/cdk": "^5.0.0-rc0", "@angular/common": "^4.4.3", "@angular/compiler": "^4.4.3", "@angular/core": "^4.4.3", "@angular/forms": "^4.4.3", "@angular/http": "^4.4.3", "@angular/material": "^5.0.0-rc0", "@angular/platform-browser": "^4.4.3", "@angular/platform-browser-dynamic": "^4.4.3", "@angular/platform-server": "^4.4.3", "@angular/router": "^4.4.3", "@types/bootstrap-datepicker": "0.0.9", "@types/bootstrap.v3.datetimepicker": "^4.17.41", "@types/daterangepicker": "^2.1.10", "@types/icheck": "^0.8.29", "@types/jquery-knob": "^1.2.29", "@types/jquery.slimscroll": "^1.3.31", "@types/jqueryui": "^1.11.35", "admin-lte": "2.3.11", "bootstrap": "^3.3.7", "bootstrap-datepicker": "^1.7.1", "bootstrap3-wysihtml5-bower": "^0.3.3", "core-js": "^2.4.1", "daterangepicker": "^2.1.25", "ej-angular2": "^15.3.34", […]

Angular-cli项目跨平台构build问题

我在Mac上创build了实验性的angular-cli项目。 比我已经把它移到Ubuntu和不能build立: $ npm install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) &开始一个: $ ng serve Cannot read property 'config' of null TypeError: Cannot read property 'config' of null at Class.run (/project-path/node_modules/@angular/cli/tasks/serve.js:51:63) at check_port_1.checkPort.then.port (/project-path/node_modules/@angular/cli/commands/serve.js:123:26) at process._tickCallback (internal/process/next_tick.js:103:7) 我很困惑,因为它在Mac上完美运行。 Env细节 […]

angular-cli没有安装在ubtunu 16.04

我已经多次尝试在我的Ubuntu 16.04上安装angular-cli,但每次失败。 我正在使用节点版本6.9.1和npm版本3.10.8。 我在这篇文章中附上错误。 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/angular-cli/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN @angular/compiler-cli@0.6.4 requires a peer of @angular/compiler@2.0.2 but none was installed. npm WARN @angular/compiler-cli@0.6.4 requires a peer of @angular/platform-server@2.0.2 but none was installed. npm WARN @angular/compiler-cli@0.6.4 requires a […]

ng:在节点v6.9.1中找不到命令

我正在尝试在我的Windows 10 PC上的angular-cli项目中执行一个ng命令。 节点v6.9.1 全球安装的angular度。 尝试了一个新鲜的NPM安装。 试图添加path C:\ Users \ MohamadS \ AppData \ Roaming \ npm \ node_modules \ angular-cli \ bin在pathvariables的uservariables中。 仍然如图中所示。 需要帮助的问题。 PS-不能使用任何ng命令(ng gc / componentName /,ng build) 编辑 – 在全局安装的项目文件夹中也尝试了相同的angular-cli版本。

npm无法安装angular-cli

我正在尝试通过npm安装angular-cli。 我有最近版本的Nodejs和git安装。 我不在任何代理服务器后面(通过netsh winhttp show proxy以及通过Internet Explorer局域网设置进行validation),并且我的Internet连接没有问题。 当我尝试运行 npm install -g angular-cli然后我得到以下错误 C:\Windows\system32>npm install -g angular-cli npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli" npm ERR! node v7.3.0 npm ERR! npm v3.10.10 npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! syscall connect npm ERR! network connect […]