在Angular 2

时间:2017-06-16 08:50:50

标签: node.js angular angular-material

我正在尝试实现素材UI。 我按照Material UI Website的所有步骤操作。 但是当我使用“npm start”命令时,它会显示如下错误。

node_modules/@angular/material/typings/button/button.d.ts(40,22): error TS2420: Class 'MdButton' incorrectly implements interface 'CanDis
able'.
  Property 'disabled' is missing in type 'MdButton'.
node_modules/@angular/material/typings/button/button.d.ts(40,39): error TS2507: Type '(new (...args: any[]) => CanDisable) & typeof MdBut
tonBase' is not a constructor function type.
node_modules/@angular/material/typings/checkbox/checkbox.d.ts(43,22): error TS2420: Class 'MdCheckbox' incorrectly implements interface '
CanDisable'.
  Property 'disabled' is missing in type 'MdCheckbox'.
node_modules/@angular/material/typings/checkbox/checkbox.d.ts(43,41): error TS2507: Type '(new (...args: any[]) => CanDisable) & typeof M
dCheckboxBase' is not a constructor function type.
node_modules/@angular/material/typings/radio/radio.d.ts(24,22): error TS2420: Class 'MdRadioGroup' incorrectly implements interface 'CanD
isable'.
  Property 'disabled' is missing in type 'MdRadioGroup'.
node_modules/@angular/material/typings/radio/radio.d.ts(24,43): error TS2507: Type '(new (...args: any[]) => CanDisable) & typeof MdRadio
GroupBase' is not a constructor function type.
node_modules/@angular/material/typings/slide-toggle/slide-toggle.d.ts(14,22): error TS2420: Class 'MdSlideToggle' incorrectly implements
interface 'CanDisable'.
  Property 'disabled' is missing in type 'MdSlideToggle'.
node_modules/@angular/material/typings/slide-toggle/slide-toggle.d.ts(14,44): error TS2507: Type '(new (...args: any[]) => CanDisable) &
typeof MdSlideToggleBase' is not a constructor function type.
node_modules/@angular/material/typings/slider/slider.d.ts(26,22): error TS2420: Class 'MdSlider' incorrectly implements interface 'CanDis
able'.
 Property 'disabled' is missing in type 'MdSlider'.
node_modules/@angular/material/typings/slider/slider.d.ts(26,39): error TS2507: Type '(new (...args: any[]) => CanDisable) & typeof MdSli
derBase' is not a constructor function type.
node_modules/@angular/platform-browser/animations/src/providers.d.ts(8,119): error TS2305: Module '"D:/NG2/ngMat/node_modules/@angular/an
imations/browser"' has no exported member 'ɵDomAnimationEngine'.
src/app/app.component.spec.ts(7,1): error TS2304: Cannot find name 'describe'.
src/app/app.component.spec.ts(12,3): error TS2304: Cannot find name 'beforeEach'.
src/app/app.component.spec.ts(19,3): error TS2304: Cannot find name 'beforeEach'.
src/app/app.component.spec.ts(25,3): error TS2304: Cannot find name 'it'.
src/app/app.component.spec.ts(25,39): error TS2304: Cannot find name 'expect'.
src/app/app.component.spec.ts(27,3): error TS2304: Cannot find name 'it'.
src/app/app.component.spec.ts(30,5): error TS2304: Cannot find name 'expect'.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! materialui@1.0.0 build: `tsc -p src/`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the materialui@1.0.0 build script 'tsc -p src/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the materialui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc -p src/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs materialui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls materialui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\NG2\ngMat\npm-debug.log

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! materialui@1.0.0 prestart: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the materialui@1.0.0 prestart script 'npm run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the materialui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs materialui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls materialui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\NG2\ngMat\npm-debug.log

我测试了角度网络应用。 Angular app工作正常。 但是当我安装材料UI时,我得到了这些错误。 我是Material UI的新手。 有谁解决了这个问题?

0 个答案:

没有答案