Bug report: the spfx project upgrade command returns badly formatted text
See original GitHub issueDescription
When running the spfx project upgrade
command, the returned text is not formatted in a helpful way.
This probably has to do with the default output type being json. If I run the command with --output text
the text is formatted fine.
Steps to reproduce
Run spfx project upgrade
on a project that needs an upgrade.
Expected results
The expected result would be helpfully formatted text, like:
Actual results
The actual result is it will show the upgrade lines with all kinds of new line characters and escape characters:
Diagnostics
No response
CLI for Microsoft 365 version
4.4.0
nodejs version
14.18,1
Operating system (environment)
Windows, Linux
Shell
PowerShell, bash
cli doctor
No response
Additional Info
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
How to upgrade your SPfx project to the latest version, and ...
Run the M365 CLI project upgrade command · Check packacke. · Try running npm dedupe · Delete node_modules and package-lock. · If you...
Read more >Welcome to the SharePoint group.
Welcome to the SharePoint group! This is the place to discuss best practices, news, and the latest trends and topics related to SharePoint....
Read more >Upgrade your SharePoint Framework (SPFx) projects to v1 ...
Project upgrade This command generates a markdown file named project-upgrade.md inside your project with all the required steps to upgrade your ...
Read more >SPFX ListView Command Set and Panel - YP code
Hi SharePoint fellows, In this post, I would like to tackle a user experience I wanted to implement in one of my projects...
Read more >SPFx export to CSV - using React CSV and Office UI Fabric ...
userRequests} filename={'Requests.csv'}> <CommandBarButton iconProps={{ iconName: 'ExcelLogoInverse' }} text='Export to Excel' /> </CSVLink>.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good catch @martinlingstuyl. Like @appieschot mentioned, this became more evident recently when we switched the default output to text. I agree that we shouldn’t manually override the output type. While this behavior is by-design, I agree that we should consider JSON output for the command. Let’s close this issue as by-design and start a new issue with a suggested enhancement where we can spec what the output should look like.
We’ve just released a preview version with the bug fixed. You can try it by running
npm i -g @pnp/cli-microsoft365@next
. Once again, thank you for reporting it @martinlingstuyl and we appreciate your help 👏