angular-seed icon indicating copy to clipboard operation
angular-seed copied to clipboard

Errors during 2.1.2 build

Open denyspavlov opened this issue 9 years ago • 1 comments

Recently we encountered an issue with angular-seed that is using Angular 2.x.x.

During normal development we used "npm start / nom run build.prod", so node_modules was quite old. Now with clean checkout we found that our builds are failing. So we looked at the clean version on angular seed 2.1.2 and discovered the same errors.

Errors are shown during "npm start":

[12:54:41] Using gulpfile /development/projects/js/angular-seed-2.1.2/gulpfile.ts
[12:54:41] Starting 'serve.dev'...
[12:54:41] Starting 'build.dev'...
[12:54:41] Starting 'build.assets.dev'...
[12:54:42] Finished 'build.assets.dev' after 861 ms
[12:54:42] Starting 'build.html_css'...
[12:54:44] Finished 'build.html_css' after 1.94 s
[12:54:44] Starting 'build.js.dev'...
/development/projects/js/angular-seed-2.1.2/node_modules/@types/jasmine/index.d.ts(40,52): error TS1005: '=' expected.
/development/projects/js/angular-seed-2.1.2/node_modules/@types/jasmine/index.d.ts(42,62): error TS1005: '=' expected.
/development/projects/js/angular-seed-2.1.2/node_modules/@angular/common/src/pipes/async_pipe.d.ts(44,38): error TS2304: Cannot find name 'Promise'.
/development/projects/js/angular-seed-2.1.2/node_modules/@angular/compiler/src/directive_normalizer.d.ts(19,100): error TS2304: Cannot find name 'Promise'.
/development/projects/js/angular-seed-2.1.2/node_modules/@angular/compiler/src/directive_normalizer.d.ts(21,74): error TS2304: Cannot find name 'Promise'.
/development/projects/js/angular-seed-2.1.2/node_modules/@angular/compiler/src/offline_compiler.d.ts(43,9): error TS2304: Cannot find name 'Promise'.

These are for clean version 2.1.2 that I downloaded from the releases.

It looks like the problem is with typescript dependencies and I found some similar bugs https://github.com/DefinitelyTyped/DefinitelyTyped/issues/15081 that give similar errors in logs. However simply adjusting the typescript to be say 2.1.4 (this is version that still worked) does not work. Possibly due to other project dependencies.

Could you advise if someone encountered this before and is there a fix/guide how to solve this? Basically we need a stable version that builds regardless of the ever evolving dependencies.

Any feedback would be much appreciated.

P.S. kudos for your project!

Current behavior Version 2.1.2 does not build

Expected behavior The stable version builds without errors

Minimal reproduction of the problem with instructions Download 2.1.2 zip, unzip, run npm install, npm start

Please tell us about your environment: DEV

  • Angular Seed Version: 2.1.2

  • Node: node --version = v5.12.0

denyspavlov avatar Mar 22 '17 13:03 denyspavlov

From what I see, it looks like there are missing type definitions for Promise. This can be either caused by old TypeScript version which doesn't include the default es2015 type definitions or misconfiguration.

The weird thing is that 2.1.2 works perfectly for me.

I'd recommend you to switch to master or 4.0.0. The changes in 4.0.0 are most likely not going to impact your project.

mgechev avatar Mar 24 '17 18:03 mgechev