Question

I am trying to set up an environment for SPFX development. I tried to install the latest version of nodejs.

I installed latest version of nodejs 14.15.4 and automatically npm verion 6.14.11 installed.

Then installed "npm install -g yo gulp" successfully.But while installing "npm install -g @microsoft/generator-sharepoint" got below error:

C:\SPFX>npm install -g @microsoft/generator-sharepoint
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN notsup Unsupported engine for got@5.7.1: wanted: {"node":">=0.10.0 <7"} (current: {"node":"14.15.4","npm":"6.14.11"})
npm WARN notsup Not compatible with your version of node/npm: got@5.7.1

+ @microsoft/generator-sharepoint@1.11.0
updated 1 package in 9.888s

Now if I try to create new SPFX project using command "yo @microsoft/sharepoint" then simply nothing is getting created inside the project folder.

Kindly help me to resolve this. Thanks in advance!

Was it helpful?

Solution

SPFX currently support Node.js 10.x and not supported Node.js 14.x, please uninstall the Node.js and reinstall Node.js 10.X version here:

Index of /dist/latest-v10.x/

OTHER TIPS

You need the earlier version of Node.js, v14.x is not supported for SPFx. I've set up with v10.22 on my machine and it works.

For more information see MS Article Install Node js

Node.js v14.x is not supported for SharePoint Framework development.

You need to use version v10.x.x (if you're developing solutions for SharePoint Server 2019 or SharePoint Online - Recommended for your case

OR v8.x.x (if you're developing solutions for SharePoint Server 2016)


At this time, Node.js v14.x is the Active LTS version listed on the Node.js homepage as the default download. To download Node.js v10.x, use the Node.js > Downloads > Previous Releases page.


I will strongly recommend you to follow the Microsoft documentation given below to set up the development environment. This is very detailed and useful guide:

Set up your SharePoint Framework development environment

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top