Skip to content

Yeoman generator unable to use older version of @microsoft/sharepoint #10268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
9 tasks
harrybbdev opened this issue May 16, 2025 · 2 comments
Open
9 tasks
Assignees
Labels
area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. sharepoint-developer-support sharepoint-developer-support type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@harrybbdev
Copy link

harrybbdev commented May 16, 2025

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

No response

Describe the bug / error

I need to install version 1.20.0 of SPFx, as a package that I am working with does not work on the later versions of Node, which 1.21.0 uses.

I have tried every combination of:

For all of these, I am met with the following screen, clearing showing 1.21.1 being used.

     _-----_     ╭──────────────────────────╮
    |       |    │ Welcome to the Microsoft │
    |--(o)--|    │      365 SPFx Yeoman     │
   `---------´   │     [email protected]     │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Workaround
The only way it works fully is via this command below:

Which is not documented as being required anywhere, hence feels like a bug.

Steps to reproduce

  1. Start on a clean install of the yeoman generator, uninstalling any globally and clearing npm cache
  2. Run npm install -g @microsoft/[email protected]
  3. Runn yo @microsoft/sharepoint
  4. Observe that 1.21.0 is used instead

Expected behavior

The generator runs with version 1.20 instead

@harrybbdev harrybbdev added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label May 16, 2025
@Ashlesha-MSFT
Copy link

Hello @harrybbdev,
Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

@Ashlesha-MSFT Ashlesha-MSFT self-assigned this May 19, 2025
@Ashlesha-MSFT Ashlesha-MSFT added the sharepoint-developer-support sharepoint-developer-support label May 19, 2025
@Ashlesha-MSFT
Copy link

@harrybbdev,
While attempting to reproduce the issue, I encountered the following error during the setup process:
Image

It appears that the @microsoft/[email protected] package requires Node.js version ≥18.17.1, as several dependencies in SPFx 1.20 depend on Node.js 14+ or 18+.

I’ve switched to Node.js v18 to ensure compatibility, and the generator is now using version 1.20 as expected.

Image

@Ashlesha-MSFT Ashlesha-MSFT added area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. labels May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. sharepoint-developer-support sharepoint-developer-support type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

2 participants