SPfx Issues Using Gulp Serve

%3CLINGO-SUB%20id%3D%22lingo-sub-3206566%22%20slang%3D%22en-US%22%3ESPfx%20Issues%20Using%20Gulp%20Serve%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3206566%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20currently%20using%20SharePoint%20Framework%20version%201.13.1%2C%20Node%20version%2014.15.0%2C%20npm%20version%206.14.8%2C%20and%20gulp-cli%20version%202.3.0.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20webpart%20using%20the%20yeoman%20sharepoint%20generator%2C%20updated%20the%20serve.json%20file%20to%20reflect%20our%20SPO%20url%20and%20(I%20believe)%20installed%20every%20necessary%20dependency%20for%20Gulp.%20However%2C%20when%20I%20run%20npm%20gulp%20serve%2C%20I%20get%20no%20output%20at%20all%20and%20nothing%20happens.%20I%20leave%20it%20running%20for%20a%20while%2C%20just%20to%20see%20if%20anything%20ever%20happens%20but%20nothing%20ever%20comes%20up.%20I%20end%20up%20having%20to%20just%20break%20the%20command.%20Is%20there%20any%20reason%20for%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3209342%22%20slang%3D%22en-US%22%3ERe%3A%20SPfx%20Issues%20Using%20Gulp%20Serve%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3209342%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1316142%22%20target%3D%22_blank%22%3E%40JordanWall%3C%2FA%3E%26nbsp%3Bthe%20problem%20might%20be%20the%20command%20%22npm%20gulp%20serve%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELeave%20the%20npm%20out%20and%20just%20try%20%22gulp%20serve%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EPlease%20click%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20SegoeUI%3B%20font-size%3A%2012.0pt%3B%20color%3A%20%23333333%3B%20background%3A%20%23F2F2F2%3B%22%3EMark%20as%20Best%20Response%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%26amp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20SegoeUI%3B%20font-size%3A%2012.0pt%3B%20color%3A%20%23333333%3B%20background%3A%20%23F2F2F2%3B%22%3ELike%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3Bif%20my%20post%20helped%20you%20to%20answer%20or%20resolve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20SegoeUI%3B%20font-size%3A%2012.0pt%3B%20color%3A%20%23333333%3B%20background%3A%20%23F2F2F2%3B%22%3ELike%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello, 

I am currently using SharePoint Framework version 1.13.1, Node version 14.15.0, npm version 6.14.8, and gulp-cli version 2.3.0.

 

I have created a webpart using the yeoman sharepoint generator, updated the serve.json file to reflect our SPO url and (I believe) installed every necessary dependency for Gulp. However, when I run npm gulp serve, I get no output at all and nothing happens. I leave it running for a while, just to see if anything ever happens but nothing ever comes up. I end up having to just break the command. Is there any reason for this?

4 Replies

@JordanWall the problem might be the command "npm gulp serve"

 

Leave the npm out and just try "gulp serve"

 

 

Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Hello Don,
I apologize, that was a typo in my posting. I run 'gulp serve' and have even run 'gulp serve --no-browser'.

@JordanWall I am not sur what is happening, since I have seen gulp serve return errors, or be very slow to start the first time, but have never seen it freeze.  I would start with environment.

 

I have a blog post that covers how to quickly set up environment, so you might check there to see if you missed anything. https://www.donkirkham.com/blog/spfx2022/ 

 

If you are using nvm, I would create a new environment with the following commands.

nvm install 14.9.0
nvm use 14.9.0
npm install gulp-cli yo @microsoft/generator-sharepoint -g

From there, change to your current project folder and execute the following

npm i -force
gulp serve --nobrowser

IF that doesn't work, try 

gulp build

If that doesn't work, try creating a new solution and execute 

yo @microsoft/sharepoint
gulp serve --nobrowser

 

I hope this helps but troubleshooting these types of problem in the forum can be challenging.

 

Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@Don Kirkham Thank you Don, I am still working on the issue so I will definitely try these suggestions. 

 

I greatly appreciate it!