sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFx 1.7 breaks solutions with hyphen in name

Open TedPattison opened this issue 7 years ago • 9 comments

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?

TedPattison avatar Jan 04 '19 15:01 TedPattison

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Jan 04 '19 15:01 msft-github-bot

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.

spfxerror

The project without he hyphen works without any issues when I follow the same steps

TedPattison avatar Jan 04 '19 15:01 TedPattison

@TedPattison What were the steps when you created the project? So that the problem can be reproduced.

Thank you.

StfBauer avatar Jan 04 '19 15:01 StfBauer

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.

TedPattison avatar Jan 04 '19 16:01 TedPattison

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?

TedPattison avatar Jan 04 '19 19:01 TedPattison

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?

patmill avatar Jan 08 '19 18:01 patmill

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!

msft-github-bot avatar Jan 16 '19 12:01 msft-github-bot

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.

msft-github-bot avatar Jan 23 '19 13:01 msft-github-bot

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

msft-github-bot avatar Jan 25 '20 12:01 msft-github-bot