在执行testing/业力转轮/量angular器时找不到命名空间NodeJS

我正在使用Ionic2和离子服务命令工作正常(见下文)。 预览我有@types/节点的问题,但我没有处理它链接一些内部代码。

我的文件tsconfig.json的设置

{ "compilerOptions": { "allowSyntheticDefaultImports": true, "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": false, "lib": [ "dom", "es2015" ], "module": "system", "moduleResolution": "node", "sourceMap": true, "target": "es5" }, "include": [ "src/**/*.ts", "typings/index.d.ts", "typings/main.d.ts" ], "typeRoots": [ "../node_modules/@types" ], "types": [ "jasmine", "node" ], "exclude": [ "node_modules", "src/test.ts", "**/*.spec.ts", "e2e", "www" ], "compileOnSave": true, "atom": { "rewriteTsconfig": true } } 

离子发送命令后,从命令行login。

  [INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address 0.0.0.0 - Ctrl+C to cancel [13:45:46] watch started ... [13:45:46] build dev started ... [13:45:46] clean started ... [13:45:46] clean finished in 15 ms [13:45:46] copy started ... [13:45:46] transpile started ... [13:45:52] transpile finished in 6.16 s [13:45:52] preprocess started ... [13:45:52] deeplinks started ... [13:45:52] deeplinks finished in 266 ms [13:45:52] preprocess finished in 266 ms [13:45:52] webpack started ... [13:45:53] copy finished in 6.76 s [13:46:05] webpack finished in 13.09 s [13:46:05] sass started ... [13:46:08] sass finished in 2.78 s [13:46:08] postprocess started ... [13:46:08] postprocess finished in 15 ms [13:46:08] lint started ... [13:46:09] build dev finished in 23.17 s [13:46:09] watch ready in 23.61 s [13:46:09] dev server running: http://localhost:8100/ 

有线是我不能在同一个项目中执行任何testing场景 。 我无法加载Nodejs namepsace。

 WARNING in ./~/ionic-angular/util/ng-module-loader.js 54:11-36 Critical dependency: the request of a dependency is an expression WARNING in ./~/ionic-angular/util/ng-module-loader.js 69:11-36 Critical dependency: the request of a dependency is an expression WARNING in ./~/ajv/lib/async.js 119:15-28 Critical dependency: the request of a dependency is an expression ERROR in D:/Work/blabla/trunk/src/app/app.spec.ts (19,16): Supplied parameters do not match any signature of call target. ERROR in D:/Work/blabla/trunk/src/view/components/login/login.spec.ts (36,45): Property 'name' does not exist on type 'LoginPage'. ERROR in D:/Work/blabla/trunk/src/platform/model/usergroupmodel.ts (92,26): Argument of type 'UserGroupBlock' is not assignable to parameter of type 'boolean'. ERROR in D:/Work/blabla/trunk/src/platform/presenter/presentersession.ts (29,26): Cannot find namespace 'NodeJS'. ERROR in D:/Work/blabla/trunk/src/platform/engine/db/storagetable.ts (30,46): Parameter 'ctor' of constructor from exported class has or is using private name 'ItemConstructor'. ERROR in D:/Work/blabla/trunk/src/platform/engine/bus/status.ts (56,9): Property 'tout' of exported interface has or is using private name 'NodeJS'. D:/Work/blabla/trunk/src/platform/engine/bus/status.ts (56,9): Cannot find namespace 'NodeJS'. ERROR in D:/Work/blabla/trunk/src/platform/presenter/presenters/usergroupspresenter.ts (43,24): Argument of type '"UserPresenter|User not found."' is not assignable to parameter of type 'boolean'. ERROR in D:/Work/blabla/trunk/src/platform/presenter/presenter.ts (189,11): Parameter 'ctor' of constructor from exported class has or is using private name 'NoParamConstructor'. ERROR in D:/Work/blabla/trunk/src/platform/engine/comm/commdiscovery.ts (7,21): Cannot find namespace 'NodeJS'. ERROR in D:/Work/blabla/trunk/src/platform/engine/comm/websocks.ts (12,25): Cannot find namespace 'NodeJS'. D:/Work/blabla/trunk/src/platform/engine/comm/websocks.ts (13,22): Cannot find namespace 'NodeJS'. D:/Work/blabla/trunk/src/platform/engine/comm/websocks.ts (14,23): Cannot find namespace 'NodeJS'.