0

I received the error message below when I tried to run gulp serve on a tile web part that I got from a starter kit from https://github.com/SharePoint/sp-starter-kit/issues/131

enter image description here

Node version: enter image description here

UPDATE:

I followed the solution on this question: Updating SPFX breaks gulp It got rid of the error message above. I then followed the direction of the first question below by Jerry_MSFT and:

  • made sure npm outdated -g wasn't throwing any mismatches
  • I updated my Node.js and SPFX

Then I found I had more errors, so I installed gulp 3.9.1, I installed the latest node-gyp, and made sure my npm in my 'Program files' was up-to-date

Now I only have one error, Error - [tslint] No valid rules have been specified for TypeScript files. Here is the error on the workbench:

enter image description here

enter image description here

enter image description here

  • 1
    Have you ran npm install command after downloading the code from github? – Ganesh Sanap Dec 25 '19 at 12:05
  • yes I have, but I have made changed the versions of node and gulp. I will redo the npm install – Lance Bitner Dec 26 '19 at 16:15
  • I rebuilt the npm install, and used gulp 3.9.1. I get a different error message: "Error: Cannot find module './ModelReferenceResolver'". Do I need gulp 4.0.2 with CLI 2.2.0? Is there an imbalance with Local gulp 3.9.1 and CLI gulp 2.2.0? – Lance Bitner Dec 26 '19 at 16:49
2

Please use npm install for ..\sp-starter-kit-master\solution folder path:

enter image description here

Then use gulp serve in the same path like this:

enter image description here

In workbench, The Tiles web part can be found and use: enter image description here

| improve this answer | |
  • I went back and used the starter kit master instead of my isolated tiles. I suppose something was out of date? I did what you said and got an error 'Error - [spfx-serve] Error: Invalid glob argument: Error - 'spfx-serve' sub task errored after 1.77 s Invalid glob argument: 'serve' errored after 1.81 s' - node -v v8.15.1 npm -v 6.13.4 gulp -v CLI version: 2.2.0 Local version: 4.0.2 – Lance Bitner Dec 26 '19 at 16:00
  • 1
    I‘m using Node.js v10.17.0 and SPFX 1.9.1, no problem when build with gulp serve. You can use "npm install @microsoft/generator-sharepoint@latest -g" to update the SPFX solution generator and suggested use Node.js v10 to test and deploy. For detailed information, please read this official document: docs.microsoft.com/en-us/sharepoint/dev/spfx/toolchain/… – Jerry_MSFT Dec 27 '19 at 6:51
  • I updated my node to 10 and spfx to 1.9.1 but got the same error. I followed the official Microsoft docs and found there is a mismatch with my nodes, the current npm is 6.11.3 and the 'npm -v' is the correct 6.13.4. This has to cause an issue... – Lance Bitner Dec 27 '19 at 17:40
  • This is the location of the current npm: C:\Program Files\nodejs\node_modules\npm. I replaced it with github.com/npm/cli and now there is no imbalance when I run npm outdated -g. That didn't solve the problem I get the same error. – Lance Bitner Dec 28 '19 at 12:06
  • 1
    Try to uninstall Node.js firstly and then configure dev environment based on this document: docs.microsoft.com/en-us/sharepoint/dev/spfx/… Delete all the starterkit folder, redownload from GitHub, unzip and build with the step above. In my side, there is no such issue will working fine... – Jerry_MSFT Dec 28 '19 at 15:50
0

This article gave me a successful gulp serve and no more error! Replace your tslint and tsconfig files with the ones on this page

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.