Identity duplication errors using Angular2 and TSD

I am trying to convert a project from Angular 1 to Angular 2.

This is a client and server project with some common code (so I keep it together). I want to use Angular 2 on the client side, so I executed ng2 QuickStart . I'm currently trying to create it inside my project.

I use TSDto manage my dependencies. Some of these dependencies, for example socket.io, rely on node.d.ts. My problem is that it angular2already expands node.d.tsand creates a definition of the environment, so when I want to use TSDwith angular2, I get a conflict between the two definitions: typings\node\node.d.ts(961,9): error TS2300: Duplicate identifier 'path'.

Here is my gulp task:

gulp.task('build.conflict', function(){

  var browserProject = tsc.createProject('browser.tsconfig.json', {
    typescript: typescript
  });

  var src = [
    'src/browser/**/*.ts',
    'typings/**/*.d.ts' // commenting out this line results in unknown modules
  ];

  var result = gulp.src(src)
    .pipe(tsc(browserProject));

  return result.js
    .pipe(gulp.dest('build/browser'));

});

, . , TSD . ( angular2, node.d.ts)

+4
1

Typings, *.d.ts tsconfig.json. - - John Papa NgConf.

UPDATE: a > 1.0.0.

0

Source: https://habr.com/ru/post/1619389/


All Articles