smmorneau / tour-of-heroes

Angular 2 Starter Project in Typescript with Linting, Minifying, and Bundling
https://tour-of-heroes-typescript.herokuapp.com/
40 stars 27 forks source link

Lots of Errors Around TS Compiler #1

Open ykh opened 8 years ago

ykh commented 8 years ago

Hi I just check out your project, it seems a good starter (and keep updated), but I got bunch of errors after I run 'gulp':

[22:45:57] Starting 'compile:ts'...
D:/Labs/tour-of-heroes/typings/browser/definitions/es6-promise/index.d.ts(9,14): error TS2300: Duplicate identifier 'Promise'.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/browser/definitions/lodash/index.d.ts(18281,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/browser/definitions/lodash/index.d.ts(18288,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/browser/definitions/lodash/index.d.ts(18292,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/browser/definitions/moment/index.d.ts(488,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/browser/definitions/moment/index.d.ts(492,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/browser/definitions/moment/index.d.ts(496,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/es6-promise/index.d.ts(9,14): error TS2300: Duplicate identifier 'Promise'.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/lodash/index.d.ts(18281,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/lodash/index.d.ts(18288,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/lodash/index.d.ts(18292,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/moment/index.d.ts(488,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/moment/index.d.ts(492,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/main/definitions/moment/index.d.ts(496,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/es6-promise/index.d.ts(9,14): error TS2300: Duplicate identifier 'Promise'.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/lodash/index.d.ts(18281,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/lodash/index.d.ts(18288,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/lodash/index.d.ts(18292,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/moment/index.d.ts(488,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/moment/index.d.ts(492,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
D:/Labs/tour-of-heroes/typings/modules/moment/index.d.ts(496,1): error TS2300: Duplicate identifier 'export='.
>>> [tsc] Typescript compilation failed
[22:45:59] TypeScript: 21 semantic errors
[22:45:59] TypeScript: emit succeeded (with errors)
[22:45:59] Finished 'compile:ts' after 2.27 s
[22:45:59] Starting 'bundle:js'...
(node:10528) DeprecationWarning: 'root' is deprecated, use 'global'
(node:10528) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
>>> [systemjs-builder] Bundling failed { Error on fetch for dist/js/main.js at file:///D:/Labs/tour-of-heroes/public/dist/js/main.js
        Error: ENOENT: no such file or directory, open 'D:\Labs\tour-of-heroes\public\dist\js\main.js'
    at Error (native)
  originalErr:
   { Error: ENOENT: no such file or directory, open 'D:\Labs\tour-of-heroes\public\dist\js\main.js'
       at Error (native)
     errno: -4058,
     code: 'ENOENT',
     syscall: 'open',
     path: 'D:\\Labs\\tour-of-heroes\\public\\dist\\js\\main.js' } }
[22:46:00] Finished 'bundle:js' after 365 ms

Can you tell me what's wrong there? :confused:

smmorneau commented 8 years ago

I am unable to simulate the error you are having. Could you tell me what commands you ran before gulp to install?

I have updated the README to be clearer about installation, and have upgraded typings to the latest versions. Once you clone the repo, all you should have to do is run npm install, and that should trigger the gulp build as well. From there you can run npm start or gulp serve to start the app.

ykh commented 8 years ago

I'm trying it again but in Linux, I'll tell you result.

ykh commented 8 years ago

It's fine on Linux (Debian - Jessie)! npm 2.15.5 node 4.4.6

I will check it again in Windows, maybe this issue is because of npm/nodejs version.

ykh commented 8 years ago

The issue in my environment is still remains! Win 8.1 Node v6.2.0 NPM 3.9.5 What info I give to you that maybe help? Did you tested it on windows before?

smmorneau commented 8 years ago

I'm running: OSX 10.11.4 Node 4.4.4 npm 2.15.1

I haven't tested on Windows so it may be the difference between Windows and Unix paths. I will look into it.

inska commented 8 years ago

Same error here. @ykh, Did you generate project with Angular CLI?

ykh commented 8 years ago

@inska No. Actually I'm giving it up, and waiting for major release of angular2 :)