New install of Node, Yo,@microsoft/sharepoint - error running sharepoint generator "generator.run is not a function"

Shawn Persels 0 Reputation points
2024-10-25T01:49:46.05+00:00

New fresh install of Node, Yo etc on winows 10

when I run "yo @microsoft/sharepoint" I get:

 _-----_

|       |    .--------------------------.

|--(o)--|    |      Welcome to the      |
```   `---------´   |  SharePoint Client-side  |

( ´U` ) | Solution Generator |

/A\ '--------------------------'

| ~ |


 ´   `  |° ´ Y `

Error: generator.run is not a function

Error @microsoft/sharepoint

generator.run is not a function
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,030 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 36,091 Reputation points Microsoft Vendor
    2024-10-25T07:10:44.6333333+00:00

    Hi @Shawn Persels,

    Per my research, you could fix the issue by downgrade to version 4.3.1. You could use the following command

    npm install -g yo@4.3.1 generator-generator
    

    And here is a similar issue with yours, please make a reference

    https://github.com/yeoman/generator-generator/issues/258


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.