找不到名称空间/名称镶边 [英] Cannot find namespace/name chrome
问题描述
我正在尝试使用Angular开发google扩展,但是发现我不能在不生成
I'm trying out the Angular to develop google extension, but found that I can't reference the chrome
object without generating the
E:/ChromeExtensions/.../node_modules/chrome-promise/chrome-promise.d.ts(2160,66)中的错误:找不到命名空间"chrome".
ERROR in E:/ChromeExtensions/.../node_modules/chrome-promise/chrome-promise.d.ts (2160,66): Cannot find namespace 'chrome'.
或
E:/ChromeExtensions/.../src/app/chrome-tabs.servi中的错误 ce.ts(14,7):找不到名称"chrome".
ERROR in E:/ChromeExtensions/.../src/app/chrome-tabs.servi ce.ts (14,7): Cannot find name 'chrome'.
我添加了chrome键入npm install --save @types/chrome
,但是它给我的只是键入,但是它不能解决构建错误.
I have added chrome typings npm install --save @types/chrome
but all it gave me was, just typings, but it doesnt resolves build errors.
如果这很重要:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.4.9
node: 6.11.4
os: win32 x64
@angular/animations: 4.4.6
@angular/common: 4.4.6
@angular/compiler: 4.4.6
@angular/core: 4.4.6
@angular/forms: 4.4.6
@angular/http: 4.4.6
@angular/platform-browser: 4.4.6
@angular/platform-browser-dynamic: 4.4.6
@angular/router: 4.4.6
@angular/cli: 1.4.9
@angular/compiler-cli: 4.4.6
@angular/language-service: 4.4.6
typescript: 2.3.4
Visual Studio Code 1.17.2
有什么建议吗?