0

Error information:

[17:20:51] Error - [tsc] node_modules/antd/lib/_util/type.d.ts(8,83): error TS1005: '?' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/_util/type.d.ts(8,95): error TS1005: ':' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/_util/type.d.ts(8,99): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(16,43): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(16,49): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(16,52): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(17,5): error TS1128: Declaration or statement expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(17,7): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(18,19): error TS1005: ',' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(18,38): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(18,50): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(18,51): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(18,57): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(19,22): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(20,11): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(20,17): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(21,49): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(22,72): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(23,70): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(24,72): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(27,13): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/antd/lib/input/TextArea.d.ts(28,1): error TS1128: Declaration or statement expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(22,43): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(22,49): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(24,19): error TS1005: ',' expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(24,38): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(24,50): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(24,51): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(24,57): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(25,22): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(26,11): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(26,17): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(27,65): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(28,70): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(29,73): error TS1109: Expression expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(30,13): error TS1005: ';' expected.
[17:20:51] Error - [tsc] node_modules/rc-textarea/lib/index.d.ts(31,1): error TS1128: Declaration or statement expected.
[17:20:51] Error - 'tsc' sub task errored after 14 s
 exited with code 2

package.json

{
    "name": "project name",
    "version": "0.0.1",
    "private": true,
    "main": "lib/index.js",
    "engines": {
        "node": ">=0.10.0"
    },
    "scripts": {
        "build": "gulp bundle",
        "clean": "gulp clean",
        "test": "gulp test"
    },
    "dependencies": {
        "@microsoft/sp-core-library": "1.10.0",
        "@microsoft/sp-lodash-subset": "1.10.0",
        "@microsoft/sp-office-ui-fabric-core": "1.10.0",
        "@microsoft/sp-property-pane": "1.10.0",
        "@microsoft/sp-webpart-base": "1.10.0",
        "@types/es6-promise": "0.0.33",
        "@types/react": "16.8.8",
        "@types/react-dom": "16.8.3",
        "@types/webpack-env": "1.13.1",
        "antd": "^4.4.1",
        "moment": "^2.24.0",
        "office-ui-fabric-react": "6.189.2",
        "rc-notification": "^3.3.1",
        "react": "16.8.5",
        "react-dom": "16.8.5",
        "typescript": "^3.3.4000"
    },
    "resolutions": {
        "@types/react": "16.8.8"
    },
    "devDependencies": {
        "@microsoft/sp-build-web": "1.10.0",
        "@microsoft/sp-tslint-rules": "1.10.0",
        "@microsoft/sp-module-interfaces": "1.10.0",
        "@microsoft/sp-webpart-workbench": "1.10.0",
        "@microsoft/rush-stack-compiler-3.3": "0.3.5",
        "gulp": "~3.9.1",
        "@types/chai": "3.4.34",
        "@types/mocha": "2.2.38",
        "ajv": "~5.2.2"
    }
}

I feel that it is a version conflict problem. I have tried the latest typescript and 3.3.4000 typescript. Do you have any ideas, it would be greatly appreciated.

4
  • Are you using antd and rc-notification libraries in your web part code anywhere? If not, can you temporarily remove these from package.json & try running npm install once? Jul 29 at 4:21
  • Also, which version of nodejs & yo are you using? Jul 29 at 4:22
  • node 10 and yo 3.
    – Amos
    Jul 30 at 14:39
  • 1
    I copied the node modules folder of another project (with the same package.json) and it worked successfully.@GaneshSanap
    – Amos
    Jul 30 at 14:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.