SPFx 1.7 breaks solutions with hyphen in name
Category
- [ ] Question
- [ ] Typo
- [X ] Bug
- [ ] Additional article idea
Creating SPFx projects with a hyphen in the solution name used to work fine. Now, when I go through steps to create new project with a hyphen in 1.7.1, the new project template introduces problems where the the new solution name is truncated and that seems to break debugging.
Is it recommended to avoid hyphens in the name of a new SPFx solution?
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Here is a little more info. I created two projects with these two paths
- C:\Student\Modules\04_SharePointFramework\Lab\spfx-lab
- C:\Student\Modules\04_SharePointFramework\Lab\spfxlab
Then I run through the new project wizard using the Yoman template. I use the workaround for debugging where I use the gulp serve command (without the --nobrowser switch) and then close the browser that opens. Then I go to the debug tab and start a debug session using the Local workbench configuration. The project with the hyphen in the name always experiences the error shown in the following screenshot.

The project without he hyphen works without any issues when I follow the same steps
@TedPattison What were the steps when you created the project? So that the problem can be reproduced.
Thank you.
I just ran yo @microsoft/sharepoint in both folders and accepted all the default settings. Then I opened the projects with VSC and tried the debugging steps listed above.
I keep trying to go through a set of steps where I can reproduce this error for you but the error is evasive. Since my last message, I have created projects with hyphens in the name that work correctly. The one thing that is reproducible is if I create a project named spfx-lab at the path **C:\Student\Modules\04_SharePointFramework\Lab**, then I get the same error every time. I do not think that gives you much to go on to reproduce the error on your end.
Have you seen the error "The value of the 'aadInstanceUrl' is not defined" before? Do you have any advice on troubleshooting this?
Are you running the generator from within a folder that it was already run? Ie, did you run the generator at the 04_* folder, or just in the Lab** folders?
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer documentation!
Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues