Skip to content

Bug report: The project name for SPFx project doctor and upgrade seems wrong when validating a SPFx project generated by Teams Toolkit  #5679

@Adam-it

Description

@Adam-it

Priority

(Low) Something is a little off

Description

When using Teams Toolkit to extend tab with SPFx project it creates the SPFx project in a nested 'src' folder (it's a bit shame the Teams Toolkit scaffolding is different than the yo SharePoint generator but still 😉).

image

When running spfx project upgrade and spfx project doctor we get reports that with 'src' as the project name in the file title.
like

# Validate project src

KInda funny 😁.

This is becasue in many places we get the name based on the path.basename(this.projectRootPath as string) like here

title: `Validate project ${path.basename(this.projectRootPath as string)}`,

I think we could improve that and take the name from .yo-rc or package-solution.json for older projects.

Steps to reproduce

  1. Using Teams Toolkit VS Code create a new Tab project using an SPFx project
  2. run spfx project doctor or upgrade in the src folder

Expected results

In the title of upgrade or validate report files I would expect the actual SPFx project name not the 'src' folder name

Actual results

we get 'src' 😉

Diagnostics

No response

CLI for Microsoft 365 version

7.1

nodejs version

18.17.1

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions