pnp / sp-dev-fx-vs-extension

Visual Studio extension work around SPFx together with community
MIT License
56 stars 25 forks source link

Visual Studio not responding when creating new project #10

Closed kjetilrg closed 7 years ago

kjetilrg commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

eshupps commented 7 years ago

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

pschaeflein commented 7 years ago

Release v1.0.3 includes fixes.

eshupps commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

The commit from June 9th should fix that problem - I may not have incremented the build number so it's probably still 1.0.3.

Get Outlook for iOShttps://aka.ms/o0ukef


From: donshults-neudesic notifications@github.com Sent: Sunday, June 11, 2017 12:26:26 PM To: SharePoint/sp-dev-fx-vs-extension Cc: Eric Shupps; Comment Subject: Re: [SharePoint/sp-dev-fx-vs-extension] Visual Studio not responding when creating new project (#10)

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]https://user-images.githubusercontent.com/16596883/27012994-e1745092-4e8f-11e7-9874-fe1b4f3265f3.png ----- Folder Mode [image]https://user-images.githubusercontent.com/16596883/27013012-2ce78616-4e90-11e7-8d98-497e3fa28ada.png

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.

โ€” You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/SharePoint/sp-dev-fx-vs-extension/issues/10#issuecomment-307643757, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALoSZIhtITdvHL-stp3VWkNWkBzn8xgWks5sDCNCgaJpZM4NytzS.

pschaeflein commented 7 years ago

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

Ahmad-Gad commented 7 years ago

Issue has been resolved after I had upgraded to the 1.0.4 version๐Ÿ‘ Download it from here guys!

Thank you very much ๐Ÿ‘

kjetilrg commented 7 years ago

Thanks alot! ๐Ÿ‘

fddavis commented 7 years ago

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

Ahmad-Gad commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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 gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: 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