Skip to content

SPFx project generation using @microsoft/sharepoint has not worked for ages #10462

@Neutrino-Sunset

Description

@Neutrino-Sunset

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version: Not relevant as can't even create project
  • SPFx version: No idea
  • Node.js version: 24.11.0
  • etc

Describe the bug / error

Setting up a project using the steps from here
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment

and here
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part

...does not work, and hasn't worked for over a year.

First off

PS C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart1> yo @microsoft/sharepoint

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |      Welcome to the      |
   `---------´   |  SharePoint Client-side  |
    ( _´U`_ )    |    Solution Generator    |
    /___A___\    '--------------------------'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `


Error: generator.run is not a function
Error @microsoft/sharepoint 

This is apparently fixed by downgrading yo.

npm install -g yo@4.3.1 generator-generator

But then this happens

PS C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart2> yo @microsoft/sharepoint

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |      Welcome to the      |
   `---------´   |  SharePoint Client-side  |
    ( _´U`_ )    |    Solution Generator    |
    /___A___\    '--------------------------'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Let's create a new SharePoint solution.
? What is your solution name? my-web-part-2
? Which baseline packages do you want to target for your component(s)? SharePoint Online only (latest)
? Where do you want to place the files? Use the current folder
Found npm version 11.6.1
? Do you want to allow the tenant admin the choice of being able to deploy the solution to all sites immediately without running any feature deployment or adding apps in sites? No
? Will the components in the solution require permissions to access web APIs that are unique and not shared with other components in the tenant? No
? Which type of client-side component to create? WebPart
Add new Web part to solution my-web-part-2.
? What is your Web part name? MyWebPart2
? What is your Web part description? MyWebPart2 description
? Which framework would you like to use? No JavaScript framework

   create package.json
   create config\package-solution.json
   create config\config.json
   create config\serve.json
   create tsconfig.json
   create .vscode\extensions.json
   create .vscode\launch.json
   create .vscode\settings.json
   create config\copy-assets.json
   create config\deploy-azure-storage.json
   create config\write-manifests.json
   create src\index.ts
   create gulpfile.js
   create README.md
   create tslint.json
   create .editorconfig
   create .gitignore
   create src\webparts\myWebPart2\MyWebPart2WebPart.module.scss
   create src\webparts\myWebPart2\MyWebPart2WebPart.ts
   create src\webparts\myWebPart2\loc\en-us.js
   create src\webparts\myWebPart2\loc\mystrings.d.ts
   create src\webparts\myWebPart2\MyWebPart2WebPart.manifest.json
   create teams\5e622553-b40f-4b9b-bbe7-fbc12f8cf22c_outline.png
   create teams\5e622553-b40f-4b9b-bbe7-fbc12f8cf22c_color.png

npm warn config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm warn deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm warn deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs
npm warn deprecated debuglog@1.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated read-package-tree@5.1.6: The functionality that this package provided is now in @npmcli/arborist
npm warn deprecated lodash.get@4.4.2: This package is deprecated. Use the optional chaining (?.) operator instead.
npm warn deprecated lodash.template@3.6.2: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
npm warn deprecated lodash.clone@4.5.0: This package is deprecated. Use structuredClone instead.
npm warn deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm warn deprecated move-concurrently@1.0.1: This package is no longer supported.
npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated figgy-pudding@3.5.2: This module is no longer supported.
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated copy-concurrently@1.0.5: This package is no longer supported.
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated glob@4.5.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated glob@7.0.6: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated abab@1.0.4: Use your platform's native atob() and btoa() methods instead
npm warn deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated plugin-log@0.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated acorn-dynamic-import@2.0.2: This is probably built in to whatever tool you're using. If you still need it... idk
npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated es6-collections@0.5.6: not actively maintained anymore
npm warn deprecated domexception@1.0.1: Use your platform's native DOMException instead
npm warn deprecated left-pad@1.3.0: use String.prototype.padStart()
npm warn deprecated gulp-open@3.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm warn deprecated @microsoft/teams-js@1.4.2: Package no longer supported. Use at your own risk
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated fs-write-stream-atomic@1.0.10: This package is no longer supported.
npm warn deprecated sane@2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm warn deprecated uuid@3.1.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated glob@3.1.21: Glob versions prior to v9 are no longer supported
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated adal-angular@1.0.16: This package is no longer supported. Please migrate to @azure/msal-angular.
npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm warn deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm warn deprecated tslint-microsoft-contrib@5.2.1: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm warn deprecated azure-storage@2.10.7: Please note: newer packages @azure/storage-blob, @azure/storage-queue and @azure/storage-file are available as of November 2019 and @azure/data-tables is available as of June 2021. While the legacy azure-storage package will continue to receive critical bug fixes, we strongly encourage you to upgrade. Migration guide can be found: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/MigrationGuide.md
npm warn deprecated msal@1.1.3: This package is no longer supported. Please use @azure/msal-browser instead.
npm warn deprecated node-sass@4.12.0: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm warn deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '\\\\?\\C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules\\node-sass',
npm warn cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart2\node_modules\node-sass'] {
npm warn cleanup       errno: -4082,
npm warn cleanup       code: 'EBUSY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules\\node-sass'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\?\\C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart2\node_modules\@microsoft\sp-webpart-workbench\local-workbench\sp-ckeditor-flight_63f8561c403ce08093093b1812fb05db'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules\\@microsoft\\sp-webpart-workbench\\local-workbench\\sp-ckeditor-flight_63f8561c403ce08093093b1812fb05db'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\?\\C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules\\@microsoft',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart2\node_modules\@microsoft\sp-loader\lib\DeveloperTools'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules\\@microsoft\\sp-loader\\lib\\DeveloperTools'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart2\node_modules\deasync
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node ./build.js
npm error (node:22116) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@3.8.0
npm error gyp info using node@24.11.0 | win32 | x64
npm error (node:25532) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Command failed: C:\Programs\Python\Python312\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm error gyp ERR! stack   File "<string>", line 1
npm error gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm error gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm error gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm error gyp ERR! stack
npm error gyp ERR! stack     at genericNodeError (node:internal/errors:985:15)
npm error gyp ERR! stack     at wrappedFn (node:internal/errors:539:14)
npm error gyp ERR! stack     at ChildProcess.exithandler (node:child_process:417:12)
npm error gyp ERR! stack     at ChildProcess.emit (node:events:508:28)
npm error gyp ERR! stack     at maybeClose (node:internal/child_process:1101:16)
npm error gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error gyp ERR! System Windows_NT 10.0.26100
npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Martin\\Workspaces\\Projects\\SharePoint\\MyWebPart2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm error gyp ERR! cwd C:\Users\Martin\Workspaces\Projects\SharePoint\MyWebPart2\node_modules\deasync
npm error gyp ERR! node -v v24.11.0
npm error gyp ERR! node-gyp -v v3.8.0
npm error gyp ERR! not ok
npm error Build failed
npm error A complete log of this run can be found in: C:\Users\Martin\AppData\Local\npm-cache\_logs\2025-11-03T11_13_58_430Z-debug-0.log

      _=+#####!
   ###########|       .--------------------------------------.
   ###/    (##|(@)    |           Congratulations!           |
   ###  ######|   \   |  Solution my-web-part-2 is created.  |
   ###/   /###|   (@) |    Run gulp serve to play with it!   |
   #######  ##|   /   '--------------------------------------'
   ###     /##|(@)
   ###########|
      **=+####!

The list of out of support components is alone is shocking. You are even using an out of support version of MS own authentication library!
Then it fails with a load of errors, and "npm install" also fails.

Is there a project generator for a SharePoint SPFx that actually works?

Steps to reproduce

Expected behavior

After following the getting started guide I expected a working project.

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.area:spfxCategory: SharePoint Framework (not extensions related)sharepoint-developer-supportsharepoint-developer-supporttype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions