Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Visual Studio not responding when creating new project #10

Closed
kjetilrg opened this issue Jun 7, 2017 · 19 comments
Closed

Visual Studio not responding when creating new project #10

kjetilrg opened this issue Jun 7, 2017 · 19 comments

Comments

@kjetilrg
Copy link

kjetilrg commented Jun 7, 2017

Category

[ ] Question
[X] Bug
[ ] Enhancement

Expected or Desired Behavior

A new project should be created.

Observed Behavior

Only a few files and folders are created (bin, obj and the project file), and the process never completes. Visual studio 2017 are not responding. Using .NET framework 4.6.1 in VS 2017 preview

Steps to Reproduce

Create new SPFx web part project, select name and location, select component name and start generating.

@eshupps
Copy link
Collaborator

eshupps commented Jun 7, 2017

Unable to reproduce this error on Windows 10 with VS 2017. Try enabling the output window in the Advanced tab and see if the Yeoman Generator is producing any errors.

@p2well
Copy link

p2well commented Jun 7, 2017

I was able to reproduce the issue. It seems that it is related to npm package microsoft/generator-sharepoint version 1.1.0. The scaffolding procedure has changed in this version and it contains now an additional option to choose which type of client-side component you would like to create (WebPart or Extension in preview). This option was not present in previous versions of microsoft/generator-sharepoint package. The generation in Visual Studio stops at this option.

@kjetilrg
Copy link
Author

kjetilrg commented Jun 7, 2017

Noticed the same as p2netdev. I also noticed that when pressing the enter key in the command prompt, letting the process complete, the generated files appear outside the project directory.

@p2well
Copy link

p2well commented Jun 7, 2017

I confirm what kjetilrg states above. I experienced same issue with the project directory.

@eshupps
Copy link
Collaborator

eshupps commented Jun 7, 2017

New commit available to fix this issue. Updates to the release folder and VSIX gallery pending.

@pschaeflein
Copy link
Collaborator

Release v1.0.3 includes fixes.

@eshupps
Copy link
Collaborator

eshupps commented Jun 9, 2017

A new commit is available (f826eb7) that adds logic to check for the generator version and updates the command string appropriately. This is necessary for devs who want to continue using the previous "stable" generator version instead of the preview version. It also adds a framework selector to the Item template which is required by the 1.1.x versions.

@donshults-neudesic
Copy link

Installed the new commit version v1.0.3, on a clean install of VS2017 Pro.
With VS in Solutions mode, I can't see the project files. With VS in Folders mode, I can see the completed solution.
Any Ideas?
----- Solution Mode
image
----- Folder Mode
image

The template seems to run fine, the generator.log doesn't show any errors. The templates files, directories and tooling files seem to be complete. gulp server shows the sp workbench webpart.

@eshupps
Copy link
Collaborator

eshupps commented Jun 12, 2017 via email

@pschaeflein
Copy link
Collaborator

Just published release v1.0.4 that includes the commit referenced above.

@Ahmad-Gad
Copy link

Issue has been resolved after I had upgraded to the 1.0.4 version👍
Download it from here guys!

Thank you very much 👍

@kjetilrg
Copy link
Author

kjetilrg commented Jul 3, 2017

Thanks alot! 👍

@fddavis
Copy link

fddavis commented Aug 10, 2017

It is still not working for me. What am I doing wrong?

@Ahmad-Gad
Copy link

Ahmad-Gad commented Aug 10, 2017

Hi @fddavis,
Did you download the version 1.0.4?
If not, please download it from here:
https://github.com/SharePoint/sp-dev-fx-vs-extension/releases/tag/v1.0.4
You need to uninstall the existing template version from the VS.Net first.

Also, make sure first that, you have the yeoman, gulp and @microsoft/generator-sharepoint are installed/updated globally:
npm install -g yo gulp
npm i -g @microsoft/generator-sharepoint
Run the above "npm" commands to install/update the required/prerequisite packages.

Please test and let us know the results!

@VesaJuvonen
Copy link
Contributor

Based on comment and final input from @Ahmad-Gad, this is now closed. @fddavis - if you still are having issues around this, please open up a new issue with additional environmental details (which versions being installed of extension and SPFx etc.). Thx.

@fddavis
Copy link

fddavis commented Aug 10, 2017

It is still not working. I am using Visual studio 2017 15.2, and SPFx v 1.0.4. Have reran the npm commands as well and it is not working.

@gonadn
Copy link

gonadn commented Sep 5, 2017

Iam having same issue VS Pro 2017, and SPFx v 1.0.4 as @Ahmad-Gad explained above....

Visualstudio is hanging on "Not Responding"....

@mateuszorlowski
Copy link

mateuszorlowski commented Sep 7, 2017

In the configuration window go to Advanced tab and select "Show command window".
Most probably Visual Studio is waiting for tenant deployment option. Select an option, close the console window and it should go through.

Apparently there is no support for generator 1.2 version yet.

@jaiswati
Copy link

jaiswati commented Mar 12, 2018

Hi Vesa,

We have installed latest SPFx Visual Studio Template for visual studio 2017 (as described above 1.4.0 latest)
but when we run the project to launch the workbench..

We need to install gulp everytime .. like npm install gulp

after it is done we need to fix
Error: Cannot find module '@ microsoft/sp-build-web'

after this is fixed we get the error
Error: listen EADDRINUSE

so after all command prompt instances are closed above error goes away..

How to avoid these errors

Error Log as follow
C:\Users\jaiswati\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5>gulp package-solution
[10:11:40] Local gulp not found in ~\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5
[10:11:40] Try running: npm install gulp

C:\Users\jaiswati\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5>install gulp
'install' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\jaiswati\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5>npm install gulp
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm notice created a lockfile as package-lock.json. You should commit this file.

C:\Users\jaiswati\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5>gulp package-solution
module.js:549
throw err;
^

Error: Cannot find module '@ microsoft/sp-build-web'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\jaiswati\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5\gulpfile.js:4:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

C:\Users\jaiswati\Documents\Visual Studio 2017\Projects\MyWebPart5\MyWebPart5>npm install --save-dev

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet