Error while compiling spfx project - Error - typescript - node_modules/@fluentui/react-focus/node_modules
Some when you create new project or upgrade existing project, developer get issues related to fluent ui packages i.e. :
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,26): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,41): error TS1005: ')' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,42): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,72): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,107): error TS1005: '(' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,113): error TS1005: ')' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(5,0): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(17,66): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(17,113): error TS1005: '(' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(17,135): error TS1005: '(' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,106): error TS1005: '>' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,114): error TS1131: Property or signature expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,120): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,127): error TS1005: ')' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,141): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,157): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,159): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,167): error TS1109: Expression expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(51,4): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(52,0): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/ObjectOnly.d.ts(0,44): error TS1005: ';' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/merge-styles/lib/ObjectOnly.d.ts(0,55): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,34): error TS1005: ',' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,59): error TS1005: '=' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,89): error TS1005: '(' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,91): error TS1005: ',' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,129): error TS1005: '=' expected.
Error - typescript - node_modules/@fluentui/react-focus/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,136): error TS1109: Expression expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,26): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,41): error TS1005: ')' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,42): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,72): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,107): error TS1005: '(' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(4,113): error TS1005: ')' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/DeepPartial.d.ts(5,0): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(17,66): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(17,113): error TS1005: '(' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(17,135): error TS1005: '(' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,106): error TS1005: '>' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,114): error TS1131: Property or signature expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,120): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,127): error TS1005: ')' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,141): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,157): error TS1005: ';' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,159): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(50,167): error TS1109: Expression expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(51,4): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/IStyleSet.d.ts(52,0): error TS1128: Declaration or statement expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/merge-styles/lib/ObjectOnly.d.ts(0,44): error TS1005: ';' expected.
.d.ts(45,59): error TS1005: '=' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,89): error TS1005: '(' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,91): error TS1005: ',' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,129): error TS1005: '=' expected.
Error - typescript - node_modules/office-ui-fabric-react/node_modules/@uifabric/utilities/lib/selection/Selection.d.ts(45,136): error TS1109: Expression expected.Error - 'typescript' sub task errored after 2.37 s
TypeScript error(s) occurred.
Solution is :
npm uninstall @microsof/rush-stack-compiler-3.3
npm install @microsoft/rush-stack-compiler-3.9@0.4 --save-dev --save-exactThen in the file tsconfig.json file update the first line from version 3.7 to 3.9:
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.9/includes/tsconfig-web.json",
Comments
Post a Comment