0
我所做的:不能與火力地堡分型(打字稿)編譯
npm install firebase --save
typings install npm~firebase --save
和typings.json看起來是這樣的:
{
"ambientDevDependencies": {
"angular-protractor": "registry:dt/angular-protractor#1.5.0+20160425143459",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"selenium-webdriver": "registry:dt/selenium-webdriver#2.44.0+20160317120654"
},
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654"
},
"dependencies": {
"firebase": "registry:npm/firebase#3.0.5+20160723033700"
}
}
我在一家* .TS進口火力地堡文件中像這樣: import * as firebase from 'firebase';
,但是當我編譯:
src/app/services-common/database.service.ts (2, 27): Cannot find module 'firebase'.
at BroccoliTypeScriptCompiler._doIncrementalBuild (C:\testapp\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:120:19)
我該如何解決這個問題?我錯過了什麼?
@謝謝,我會檢查。儘快更新 – elranu