1

The following command is hanging at 'Add new Web part to solution' when I run it from the project directory:

yo @microsoft/sharepoint --solution-name first-test --framework react --component-type webpart --component-name FirstTest --environment spo --skip-feature-deployment false --is-domain-isolated n

I have installed Node.js 14.16.1 LTS and the latest versions of gulp, yeoman and microsoft/generator-sharepoint globally. (I've run npm list –g –depth=0 and npm –g outdated to make sure they are there and the latest)

The virtual machine I'm running it on has .NET 4.5 installed.

Is there something else I need to do or check?

Thanks

1

SPFx is not yet compatible with node.js 14.x This is the compatibility matrix. It is important not to install versions of node or yeoman that are too new. Here is the compatibility matrix that will work. Credits to Huge Bernier:

Node.js LTS 10.x

  • @microsoft/generator-sharepoint@1.11.0
  • gulp@4.0.2
  • yo@3.1.1
  • npm@6.14.11

Caution about SPFx 1.12

Version1.12 release is currently considered as deprecated and has been unpublished due the unexpected regressions.

We recommend usage of v1.11 until updated version is available.

Caution about yeoman: do not install 4.x. stick to the 3.x version.

.NET version is irrelevant for SPFx since it's a cross platform framework.

4
  • Reinstalled everything as above and checked with npm list. Yo still hanging on 'Add new web part to solution'. Running the script in PowerShell ISE as Administrator. Administrator has full control over the project directory. The script is adding a folder to the project directory. Wondering if there is something about my Windows 10 vm that is stopping it? Apr 30 at 0:33
  • could you try disabling real-time protection for Microsoft Defender Antivirus? Apr 30 at 0:45
  • 1
    Tried the same command in the regular PowerShell Console and it hung at 'Found npm'. Put in just 'Yo @microsoft/sharepoint' and stepped through the wizard and it is generating the solution - looking good so far Apr 30 at 1:59
  • This worked as far as generating a solution, but Gulp Workbench isn't working. To get 'gulp trust-dev-cert' to run I had to install gulp@3.9.1 locally. When I run 'gulp serve' I get 'EPERM: operation not permitted, symlink'. I'm thinking I can probably do without Workbench anyway May 3 at 6:00

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.