Angular2 + TypeScript + webpackでmoduleを読み込んでくれない
📅 2016/02/07
以下のようなエラーが出てwebpack –progress –profile –colors –display-error-details –display-cached
でbuildが出きなかった。
ERROR in /Users/epy0n0ff/git/github.com/epy0n0ff/angular2-typescript-webpack/src/top/top.component.ts
(1,25): error TS2307: Cannot find module 'angular2/core'.
ERROR in ./src/main.ts
(1,28): error TS2307: Cannot find module 'angular2/platform/browser'.
tsconfig.json
の項目不足で"moduleResolution”: “node"
をcompilerOptions
に追加してやるとnode_modules
から読み込んでくれるようになった。