Tag: 量angular器

包括TypeScript编译上下文中的app.component.ts

我已经build立了一个Angular2项目跟随Angular2文档当我想从@angular/core打字稿导入Component给我这个错误 TypeScript编译上下文中不包含文件“C:/sendbox/mean/client/app/app.component.ts”。 如果不是这样,请检查您的tsconfig.json文件的“files”或“filesGlob”部分。第1行col 1

package.json失败,出现错误Windows_NT 6.2.9200蔚蓝

我正在尝试在azure上部署angular2网站。 我的package.json中的postinstall命令在Azure上部署时会抛出错误。 任何人都可以请build议可能导致这个错误? PFB快照:我的postinstall命令如下所示: "postinstall": "typings install && tsc" 如果我不写“&& tsc”,那么ts文件不会被编译为js,但部署是干净的。 logging部署错误: Command: "D:\home\site\deployments\tools\deploy.cmd" Handling node.js deployment. KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot' Copying file: 'npm-debug.log' Copying file: 'package.json' Invalid start-up command "tsc && concurrently "tsc -w" "lite-server" " in package.json. Please use the format "node <script relative path>". Looking for app.js/server.js under site root. Missing […]

错误TS2307:无法find模块“应用程序”

我想在节点端使用打字稿。 我有一个非常简单的服务器。 我的服务器文件夹里面的tsconfig.file如下: { "compilerOptions": { "module": "commonjs", "target": "es5", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "outDir": "../dist/serverBuild", "typeRoots": [ "../node_modules/@types" ] }, "exclude": [ "../node_modules" ] } 我有一个app.ts文件,其中有明确的相关configuration,然后我有server.ts文件,这是从app.ts导入应用程序模块,它有创build和启动节点服务器的代码。 但是我得到以下错误: TSError:⨯无法编译TypeScript server.ts(11,22):找不到模块'app'。 (2307) 其他模块,我在我的server.ts文件中导入像http模块不会抛出任何这样的错误。 我在这里做错了什么。 以下是我如何导入模块: import * as http from "http"; import * as app from "app"; 谢谢!

npm ERR! Windows_NT 10.0.10586

我正在尝试为Angular2做环境设置,为此,我在使用命令npm install时遇到了下面提到的错误 我有节点版本:节点版本是v6.7.0,npm版本是3.10.3 有没有解决scheme?

令牌和安全与条纹api为node.js(条纹节点)

sorting一个新手问题。 我正在研究在Angular 2应用程序中使用Stripe,并计划使用node.js实现一个服务器(沿着服务angular网页的服务器),以从angular度客户端接收令牌,然后调用stripe-node函数(需要一个密钥) 从那里。 我想知道如果我需要对我在那里收到的令牌进行validation。 由于任何人都可以看到该服务器的url,他们可以创build问题吗? 谢谢。

无法从Node.js命令提示符运行量angular器

希望一切安好。 我第一次通过Node.js设置量angular器。 这是在“运行E2Etesting”下的AngularJS网站上作为教程的一部分提供的: https : //docs.angularjs.org/tutorial 但是,通过提供的命令“npm run protractor”执行量angular器时,Node.js命令提示符中出现以下错误: E/launcher – Process exited with error code 199 npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE npm ERR! angular-phonecat@0.0.0 protractor: `protractor e2e-tests/protractor.conf.js` npm ERR! Exit status 199 npm ERR! […]

使用HtmlPlugin从一个子目录为webpack构build资源

我目前使用WebpackHtmlPlugin来简化我的index.html入口点,但是我的主要问题是index.html与所有其他资源(即publicPath所指向的任何地方)处于同一级别。 我想有一个文件夹中提供的index.html和webpack在子文件夹中生成的所有资产。 像这样的东西 index.html build/ bundle.js 1.bundle.js 2.bundle.js 有没有什么办法可以达到这个目的,而不会违背webpack手动映射每个资产,并将publicPath设置为root?

meteor:在打字中写meteor法时,找不到模块纤维/未来

我用angular2使用typecript es6和我遇到这个错误,同时为asynchronous函数写一个meteor方法。 我在插入查询中遇到了一个同步问题,因为当名称相同时,它在插入时不提供给我一个错误。 所以我决定使用光纤和未来,但打字稿不断给我一个错误,它无法find纤维/未来的模块。 我已经试过meteornpm安装光纤,meteornpm安装未来,meteor添加ostrio:neo4jdriver@1.0.2-纤维,但没有任何工作。 如果有任何解决scheme,请告诉我。 如果有其他方法可以用来解决这个问题,请告诉我。 import { Emails } from '../collections/emails.collection'; import { check } from 'meteor/check'; import { Meteor } from 'meteor/meteor'; import Future from 'fibers/future'; Meteor.methods({ loadEmailTemp: function(tempn: string){ let temp = Emails.findOne({tempname: tempn}); return temp; }, getAllTemplates: function() { let temps = Emails.find({}).fetch(); return temps; }, newTemplate: function(tempn: string) { […]

量angular器:logging操作

我已经被要求logging所有量angular器的操作。 东西沿线 console.log(action + " was called with arguments " + args.join(", "); 我的第一个努力是将全局可用的browser.driver包装到一个Proxy对象中,然后在我的testing中使用这个代理对象,并在将调用传递给目标之前logging该操作。 这适用于诸如“get”之类的方法,但是这似乎不捕获诸如click和sendKeys之类的事件。 我尝试在代理中包装全局可用的元素函数,但是这不起作用,只是随机地输出被调用的“全部”方法。 有没有简单的方法来logging所调用的webdriver操作?

安装Angular 2 Universal

更新: 我正在尝试使用本指南来安装Angular 2 Universal,但是当我运行以下命令时,出现一些错误。 这里是命令: typings install node express body-parser serve-static dexpress-serve-static-core mime –global –save 而错误是: C:\Users\user\Desktop\myApp>typings install node express body-parser serve-static dexpress-serve-static-core mime –global –save typings INFO globaldependencies "express" lists global dependencies on "node" that must be installed manually typings INFO globaldependencies "serve-static" lists global dependencies on "node" that must be installed manually typings […]