Yarn: Angular 2 project : need separate `typings install`

Created on 12 Oct 2016  路  7Comments  路  Source: yarnpkg/yarn

Bug report

Current behavior

After using yarn install in an Angular 2 final (2.0.0) project with default settings (as described in Angular 2 Quickstart tutorial), subsequent npm start command fails. Apparently because typings haven't been executed/installed.

expected behavior

npm start should run the the project without issues.

Workaround

After executing yarn install, if you manually execute typings install, everything runs fine after executing npm start

Please mention your node.js, yarn and operating system version.-

  • Mac OSX El Capitan 10.11.6
  • NodeJS version 6.1.0
  • Yarn version 0.15.1

Most helpful comment

I think it is related to #721 , usually Angular 2.0 project uses postinstall npm script to run typings install

All 7 comments

Hmm, I have always had to do typings install after npm install. I would very much welcome this improvement, though. (Not using Angular 2.0, though)

Yes, Angular documentation says so (I believe something like 'if your typings folder doesn't show up, do a typings install). I however have never faced this issue, typings always automagically appeared after running npm install.

With Yarn however I _always_ have to do a typings install. It should save a step if this was executed automatically.

I think it is related to #721 , usually Angular 2.0 project uses postinstall npm script to run typings install

Can you reproduce this with yarn@latest? I'm not able to recreate the issue using the latest Angular QuickStart and Yarn v0.17.10.

@busches , I do not think you can reproduce this postinstall issue by using Angular QuickStart, since it does not use postinstall to install typings, it uses @types npm packages.
I tried Yarn 0.17.9 with postinstall task, it works fine. I think it was fixed in #721

@br1anchen if you have a use case that can replicate the issue and confirm it's closed, that would be ideal.

Yes, I can confirm it works with newer versions of Angular Quickstart. It worked since the @types versioning was introduced (I'm not sure in which version this was). So I feel the issue is correctly closed.

Was this page helpful?
0 / 5 - 0 ratings