question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug report: the spfx project upgrade command returns badly formatted text

See original GitHub issue

Description

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:

image

Actual results

The actual result is it will show the upgrade lines with all kinds of new line characters and escape characters:

image

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:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
waldekmastykarzcommented, Feb 16, 2022

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.

1reaction
waldekmastykarzcommented, Apr 7, 2022

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 👏

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found