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

issue upgrading to spfx 1.5.1

Open RiddhiKarani opened this issue 8 years ago • 8 comments

Category

  • [ ] Question
  • [ ] Typo
  • [ X] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

upgraded spfx library to 1.5.1 version and getting below errors when compiling

Observed Behavior

/node_modules/@microsoft/sp-http/dist/index-internal.d.ts(180,22): error TS2420: Class 'HttpClientResponse' incorrectly implements interface 'Body'. Property 'body' is missing in type 'HttpClientResponse'.

/node_modules/@microsoft/sp-http/dist/index-internal.d.ts(232,5): error TS2416: Property 'clone' in type 'HttpClientResponse' is not assignable to the same property in base type 'Response'. Type '() => HttpClientResponse' is not assignable to type '() => Response'. Type 'HttpClientResponse' is not assignable to type 'Response'. Property 'redirected' 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'.

node_modules/@types/adal/index.d.ts(11,14): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context.

/node_modules/office-ui-fabric-react/node_modules/@uifabric/utilities/lib/createRef.d.ts(1,43): error TS2694: Namespace 'React' has no exported member 'RefObject'.

i already tried re-compiling, deleting the older node module packages and doing npm install again, still see these errors.

RiddhiKarani avatar Aug 31 '18 06:08 RiddhiKarani

Do you have a lock file like package-lock.json or npm-shrinkwrap.json? If so, after deleting your node_modules folder also delete the lock file and try running npm install then. Without deleting the lock file, npm would still install old versions of the packages you updated in package.json.

waldekmastykarz avatar Aug 31 '18 06:08 waldekmastykarz

just tried that, deleted the package-lock.json and again the node modules folder, ran npm install still seeing the exact same set of errors.

RiddhiKarani avatar Aug 31 '18 06:08 RiddhiKarani

What are the exact steps you've taken to upgrade your project to v1.5.1 and which we could use to repro the issue?

waldekmastykarz avatar Aug 31 '18 09:08 waldekmastykarz

I installed the updated versions of the below node packages, below are the older versions "@microsoft/sp-webpart-base": "^1.4.1", "applicationinsights-js": "^1.0.14", "office-ui-fabric-react": "^5.106.1-hotfix.1", "@types/applicationinsights-js": "^1.0.5", "@types/handlebars": "^4.0.36", "copy-webpack-plugin": "^4.3.1", "node-sass": "^4.7.2", "postcss-modules": "^1.1.0", "tslint": "^5.9.1", "typescript": "~2.4.1", "webpack-merge": "^4.1.1", below are the latest versions

"@microsoft/sp-webpart-base": "^1.5.1", "applicationinsights-js": "^1.0.19", "office-ui-fabric-react": "^6.55.0", "@types/applicationinsights-js": "^1.0.6", "@types/handlebars": "^4.0.39", "copy-webpack-plugin": "^4.5.2", "node-sass": "^4.9.3", "postcss-modules": "^1.3.2", "tslint": "^5.11.0", "typescript": "^3.0.1", "webpack-merge": "^4.1.4",

then deleted the package-lock.json file, ran npm install and then gulp --clean gives the above mentioned errors.

RiddhiKarani avatar Aug 31 '18 11:08 RiddhiKarani

What about the rest of @microsoft packages? From the list above it seems like you've updated only one of them

waldekmastykarz avatar Aug 31 '18 13:08 waldekmastykarz

Hi @RiddhiKarani, can you reply on Waldek's question around the @microsoft packages? Upgrading absolutely can be done, it's just matter of finding what you are missing. Thanks for the additional details advance.

VesaJuvonen avatar Sep 13 '18 16:09 VesaJuvonen

Closing due to no response.

VesaJuvonen avatar Oct 04 '18 17:10 VesaJuvonen

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 26 '20 18:01 msft-github-bot