我是新手,试图在我的angular2-meteor应用程序中使用kiteconnect npm pacakge,但当我尝试在我的app.module.ts中导入此包时,它说无法找到模块'KiteConnect'。 以下是我在导入语句
下面使用的语句import {KiteConnect} from 'KiteConnect';
我确信这是非常愚蠢的事情,但有人可以指出我在这里做错了什么。
以下是我的package.json
的摘录{
"name": "socially",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --driver-package practicalmeteor:mocha",
"test:ci": "meteor test --once --driver-package dispatch:mocha-phantomjs"
},
"dependencies": {
"@angular/common": "2.1.2",
"@angular/compiler": "2.1.2",
"@angular/core": "2.1.2",
"@angular/forms": "2.1.2",
"@angular/platform-browser": "2.1.2",
"@angular/platform-browser-dynamic": "2.1.2",
"@angular/router": "3.1.2",
"angular2-meteor": "0.7.0",
"angular2-meteor-accounts-ui": "^1.0.0",
"angular2-meteor-polyfills": "0.1.1",
"angular2-meteor-tests-polyfills": "0.0.2",
"kiteconnect": "^1.1.1",
"meteor-node-stubs": "0.2.3",
"meteor-rxjs": "0.4.3",
"meteor-typings": "1.3.1",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26"
},
"devDependencies": {
"@types/chai": "^3.4.33",
"@types/mocha": "^2.2.32",
"chai": "3.5.0",
"chai-spies": "0.7.1"
}
}
我还尝试使用“粉笔”包,但导入时再次出现同样的问题。现在我怀疑是因为编辑器(我正在使用webstorm)还是因为tsconfig.josn,如下所示:
{
"compilerOptions": {
"target": "es5",
"lib": [
"es6",
"dom"
],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"sourceMap": true
},
"exclude": [
"node_modules"
],
"files": [
"typings.d.ts"
],
"compileOnSave": true,
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit": true
}
}
答案 0 :(得分:0)
在调用meteor npm install kiteconnect
$_GET["page"]