Got a following error after installing the SPFx environment for the first time

any help would be helpful. Thanks in Advance.

enter image description here

  • couple of things to check - 1) execute the yo @microsoft/sharepoint generator as admin 2) If you are inside a firewall, can you try it outside ? or try using a different network ? Apr 19 '19 at 7:32

Check what is your NodeJS version

NodeJS has two LTS versions - 8 and 10. The current supported LTS version of NodeJS for the SharePoint Framework is 8.x and can be downloaded from https://nodejs.org/en/download/releases/. Notice that 9.x or 10.x versions are currently not supported with SharePoint Framework development.

If you NodeJS version is 8.x and still facing issue, Ran install command manually.

npm install @microsoft/sp-build-web

Also try to run 'npm install --save-dev' on your project folder.

npm install --save-dev

if above 2 does not work, check this link it some other solutions also.

Hope this helps...happy coding!!!

  • Hi Siddharth, I tried all the options which you suggested but still getting the error this time from the module.js file Apr 17 '19 at 11:29
  • What is your nodejs version Apr 17 '19 at 15:14
  • My nodejs version is 8.11.4 Apr 19 '19 at 6:47
  • can you run command 'npm install --save-dev' on folder and then try ? it seems your dependency is not installed. Apr 19 '19 at 6:59
  • Yes i have the same doubt while installing yo @microsoft/sharepoint I got some errors in the cmd prompt. I have added the screenshot in the answer section Apr 19 '19 at 7:01

Try this might be helpful


If it's not working then please uninstall nodejs and reinstall from scratch and try.


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.