Search code examples
office-jsyeomanoffice-addinsyeoman-generator

`yo office` gives error Spawn git ENONENT


I am using the yeoman-generator office as per the official docs

https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/project-quickstart

Node: Version :10.16.0 (LTS)

Ran the following command. No error

npm install -g yo generator-office

But when I try to run

yo office

getting the following error

enter image description here

Trying hard for more than a day. Removed npm cache and followed the similar issue `yo angular` gives error: npm ERR! code ENOENT npm ERR! errno 34 (yes I have cleaned the cache and set .npmignore)

Also, downgraded node version to v8 and npm downgraded, tried almost all configuration possibilities

but nothing seems to work. Any help is appreciated


Solution

  • Thank you @Ragavan Rajan for reaching out, and for using the Yo Office! There is an open issue with Yo Office that it requires the git client to be installed.

    We are in the process of looking for a solution, but in the mean time, if you are able to install the git client this will fix the problem. Another option is that you can download the templates from their respective repos directly using the zip files from the repo. Detail's on the locations of the different repos for the templates are located in the configuration file that comes along with Yo Office.

    I hope this helps you! Feel free to add your comments and your error details to the issue as well. Our team will try and provide a better alternative soon. Thank you again for using Yo Office and building on the Office Platform!