Sp-dev-docs: Getting Errors after upgrade to SPFx 1.5.0

Created on 15 Jun 2018  路  12Comments  路  Source: SharePoint/sp-dev-docs

_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@microsoftsp-http\lib\httpClient\HttpClientResponse.d.ts(15,22): error TS2420: Class 'HttpClientResponse' incorrectly implements interface 'Response'.
[18:53:50] Error - typescript - node_modules@typesreact\index.d.ts(165,11): error TS2559: Type 'Component' has no properties in common with type 'ComponentLifecycle'.
[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_

spfx-general fixed-next-drop tracked

Most helpful comment

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.

All 12 comments

_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.

_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.

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."

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

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

Possible solution #2093

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

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.

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

@VesaJuvonen kindly suggest

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.

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

Was this page helpful?
0 / 5 - 0 ratings