sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Getting Errors after upgrade to SPFx 1.5.0

Open VesaJuvonen opened this issue 8 years ago • 12 comments

From @bhanuprakash857 on June 14, 2018 13:29

I'm trying to upgrade my webpart from 1.1.0 to 1.5.0. I have upgraded the versions to 1.5.0 after that ,while runing gulp serve i'm getting below error. gulp serve

image

Errors: [18:53:50] Error - typescript - node_modules@microsoft\sp-http\lib\httpClient\HttpClientResponse.d.ts(15,22): error TS2420: Class 'HttpClientResponse' incorrectly implements interface 'Response'. [18:53:50] Error - typescript - node_modules@types\react\index.d.ts(165,11): error TS2559: Type 'Component<P, S>' has no properties in common with type 'ComponentLifecycle<P, S>'. [18:53:50] Error - typescript - src\webparts\caNewsAggregator\app\app-module.ts(10,33): error TS2345: Argument of type 'typeof HomeController' is not assignable to parameter of type 'Injectable'.

Copied from original issue: SharePoint/sp-dev-fx-webparts#536

VesaJuvonen avatar Jun 15 '18 05:06 VesaJuvonen

From @JayakumarB on June 14, 2018 13:40

Hi @bhanuprakash857 ,

May be one of the dependency for HttpClientResponse not loaded properly, can you please try to delete the node_modules in project folder and re-install it again using the npm install command and check.

VesaJuvonen avatar Jun 15 '18 05:06 VesaJuvonen

From @bhanuprakash857 on June 14, 2018 14:54

Hi @JayakumarB ,

Thank you for the reply.I have removed the node_modules and ran the npm install command. Still i'm getting the same errors.

VesaJuvonen avatar Jun 15 '18 05:06 VesaJuvonen

As this is NOT around any samples in the this repository, moving this discussion to the sp-dev-docs repository like noted in the issue template.

"Use the following form to submit an issue only if it's related to samples in this repo. If you have an issue related to the SharePoint Framework or its documentation, please submit the issue at https://github.com/SharePoint/sp-dev-docs/issues/new. This will help us respond to your issue faster."

VesaJuvonen avatar Jun 15 '18 05:06 VesaJuvonen

Package.json image

I'm upgrading my SPFx webpart to 1.5.0 and upgraded the node_modules from 1.1.0 to 1.5.0 I'm getting below errors. Could any one help me to fix this issues

image

Please find the realted Article information: https://github.com/SharePoint/sp-dev-docs/issues/690

bhanuprakash857 avatar Jun 19 '18 05:06 bhanuprakash857

Can you delete the whole node_modules folder and re-execute the npm install command. This should resolve the issue what you are seeing.

VesaJuvonen avatar Jun 19 '18 17:06 VesaJuvonen

Possible solution #2093

vsoderholm avatar Jun 22 '18 05:06 vsoderholm

Possible fix with upcoming 1.5.1, let's double check when it's out.

VesaJuvonen avatar Jun 26 '18 18:06 VesaJuvonen

This should be now addressed with the 1.5.1 release, so would request to validate the situation with following. Here are short release notes for 1.5.1 release - https://twitter.com/SharePoint/status/1011689501213757441.

VesaJuvonen avatar Jun 26 '18 19:06 VesaJuvonen

i m still seeing this issue with 1.5.1 additionally see below errors -

/node_modules/@microsoft/sp-http/dist/index-internal.d.ts(180,22): error TS2420: Class 'HttpClientResponse' incorrectly implements interface 'Response'. Property 'body' is missing in type 'HttpClientResponse'. /node_modules/@microsoft/sp-page-context/dist/index-internal.d.ts(134,23): error TS2304: Cannot find name 'AzureActiveDirectoryInfo'. /node_modules/@microsoft/sp-page-context/dist/index-internal.d.ts(536,21): error TS2304: Cannot find name 'O365GroupAssociation'. TypeScript: 3 semantic errors TypeScript: emit succeeded (with errors) [16:43:25] Finished 'tsc' after 7.78 s

i have deleted the old node modules folder and did npm install but still see the above errors

RiddhiKarani avatar Aug 17 '18 12:08 RiddhiKarani

@VesaJuvonen kindly suggest

RiddhiKarani avatar Aug 20 '18 07:08 RiddhiKarani

I'm also seeing this after updating from 1.4.1 to 1.5.1. Troubleshooting now and will get back after I figure out the cause.

Error - typescript - node_modules/@microsoft/sp-http/dist/index-internal.d.ts(180,22): error TS2420: Class 'HttpClientResponse' incorrectly implements interface 'Response'.
Error - typescript - node_modules/@microsoft/sp-page-context/dist/index-internal.d.ts(134,23): error TS2304: Cannot find name 'AzureActiveDirectoryInfo'.
Error - typescript - node_modules/@microsoft/sp-page-context/dist/index-internal.d.ts(536,21): error TS2304: Cannot find name 'O365GroupAssociation'.
Error - typescript - node_modules/@types/es6-promise/index.d.ts(11,15): error TS2300: Duplicate identifier 'Promise'.
Error - typescript - node_modules/@types/es6-promise/index.d.ts(42,19): error TS2300: Duplicate identifier 'Promise'.
Error - typescript - node_modules/typescript/lib/lib.es2015.iterable.d.ts(211,11): error TS2300: Duplicate identifier 'Promise'.
Error - typescript - node_modules/typescript/lib/lib.es2015.promise.d.ts(223,13): error TS2300: Duplicate identifier 'Promise'.
Error - typescript - node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts(168,11): error TS2300: Duplicate identifier 'Promise'.
Error - typescript - node_modules/typescript/lib/lib.es5.d.ts(1288,11): error TS2300: Duplicate identifier 'Promise'.
Error - 'typescript' sub task errored after 3.74 s
 TypeScript error(s) occurred.

Adding "skipLibCheck": true to tsconfig fixed (workaround?) it.

jpalo avatar Aug 31 '18 08:08 jpalo

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 27 '20 12:01 msft-github-bot