Trying to create a SharePoint Framework app with in typescript. I try to add Material-ui/core, and when I go to serve it, I get lots of errors:
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(29,75): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(29,99): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,54): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,78): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,81): error TS1109: Expression expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,97): error TS1109: Expression expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,122): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,130): error TS1128: Declaration or statement expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(31,138): error TS1005: ',' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(44,48): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(44,49): error TS1109: Expression expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(44,50): error TS1109: Expression expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(44,68): error TS1005: '(' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(44,69): error TS1005: ')' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(46,30): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(46,54): error TS1005: ';' expected.
[17:10:51] Error - [tsc] node_modules/@types/prop-types/index.d.ts(46,57): error TS1109: Expression expected.
[17:10:51] Error - 'tsc' sub task errored after 5.66 s
Here are my Dependencies:
"dependencies": {
"@material-ui/core": "^3.3.0",
"@microsoft/microsoft-graph-types": "^1.5.0",
"@microsoft/sp-core-library": "1.6.0",
"@microsoft/sp-lodash-subset": "1.6.0",
"@microsoft/sp-office-ui-fabric-core": "1.6.0",
"@microsoft/sp-webpart-base": "1.6.0",
"@types/es6-promise": "0.0.33",
"@types/react": "15.6.6",
"@types/react-dom": "15.5.6",
"@types/webpack-env": "1.13.1",
"office-ui-fabric-react": "5.126.0",
"react": "15.6.2",
"react-dom": "15.6.2"
},
Any suggestions?
EDIT:
I'm running 3.1.3 typescript:
@type/prop-types:
So I ran "yarn list --depth=0" and it lists typescript at version 2.4.2. This was on a newly created SPFx project. I've run "yarn add typescript@latest" to update it. Is the @microsoft/sharepoint scaffolding forcing the project to use 2.4.2?
Looking at @microsoft/sp-tslint-rules/package.json: