0

I have one old SPFx react webpart created in Node version 10.18.1. Now I have install node version 18.19.0

How can I Upgrade my old SPFx react webpart into new node version 18.19.0?

1 Answer 1

0

First, I would recommend that you consider using Node version manager (NVM) so that you can have multiple versions of Node.js installed on your machine at the same time. This will assist in the process of upgrading SPFx projects. For more information see, Manage Multiple Node.js Version Installs with NVM.

To prepare for the project upgrade, you'll need to know which version of SPFx your project currently uses and which version of SPFx you want to target. To get the version of SPFx your project currently uses, look at the version property of the JSON object stored in the .yo-rc.json file. To pick a SPFx target version, check out the SharePoint Framework development tools and libraries compatibility documentation. It has a table that shows the version(s) of Node.js compatible with each version of the SharePoint Framework (see below). Based on your question, I would suggest you target SPFx v1.19.0.

The final step is to actually do the project upgrade. If you are upgrading across multiple SPFx versions (e.g. from v1.10.0 to v1.19.0) you might want to do the upgrade incrementally rather than attempting to do it all in one big step. This is where NVM would be very handy.

As to the project upgrade process, search for "spfx project upgrade" in your favorite search engine. You'll find several resources that explain what needs to be done.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.