3

I just reset my development environment and installed node and npm via nvm. Also installed yeoman and downloaded the @microsoft/sharepoint generator. When I go to run the yo @microsoft/sharepoint I get to to the point where I name my extension and get the following error: Error

Cannot find "package.json" file required by this generator

Jono Suave
  • 101
  • 1
  • 5

1 Answers1

1

This happens if you already have a .yo-rc.json file in the folder you're trying to create your SPFx project OR the file exists in a folder higher up the tree. It might be that you can't see it because this file could be hidden.

This was what was in the folder I was running the yo command in.

enter image description here

Deleting the files fixed it for me.

Mark van Dijk
  • 214
  • 1
  • 9