Question about environment to use when running m365 spfx project upgrade #4855
-
I have a project built for SPFx 1.13.0 which requires node v14. When running the m365 spfx project upgrade command (in this case with options -toVersion1.16.1 md > "upgrade-to-1_16_1.md" should I run it under the node version the SPFx project needs or the node version for the SPFx level I want to upgrade it to? And, as a followup, is it correct that I should switch to the node version that supports the SPFx version I want to upgrade to (in this case 1.16.1)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @JJFranko The Node version needed to run CLI for Microsoft 365 is independent of the version of SPFx you are trying to upgrade. The prerequisites to run the CLI are listed here: https://pnp.github.io/cli-microsoft365/user-guide/installing-cli/#prerequisites One tip I would like to pass: try specifying the shell you are using in the command. If you are using PowerShell for example, specify |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification. I have "inherited" a number of projects that need attention and using the m365 spfx project upgrade component seems to be the most efficient way to begin the process. I will add in powershell as an option during my next attempt(s). |
Beta Was this translation helpful? Give feedback.
Hi @JJFranko
The Node version needed to run CLI for Microsoft 365 is independent of the version of SPFx you are trying to upgrade. The prerequisites to run the CLI are listed here: https://pnp.github.io/cli-microsoft365/user-guide/installing-cli/#prerequisites
So whether you use node v1.16.1 or v1.12.1 for example doesn't really matter, they will give the same output.
One tip I would like to pass: try specifying the shell you are using in the command. If you are using PowerShell for example, specify
--shell powershell
as extra parameter. This will give you a way much better result!