yeoman creates project in Desktop even though I CD into directory

后端 未结 2 1465
一个人的身影
一个人的身影 2021-01-29 01:58

I am having a issue creating a yeoman project. I cd in the directory type yo and it says:

Here is it suppose to asked me project name etc and it wants to t

相关标签:
2条回答
  • 2021-01-29 02:37

    If you have a .yo-rc.json file in a parent directory, Yeoman will load that configuration and generate from that file instead of prompting. This allows developers to run a yo command from any folder in the project and have it apply to the correct files.

    To solve this, remove the .yo-rc.json from the parent directory, in your case /Users/drew/Desktop.

    For example, if you are in the directory /Users/drew/Desktop/new-project but /Users/drew/Desktop has a .yo-rc.json inside, Yeoman will change to the parent directory (Desktop), load the configuration, and generate the files from that folder instead of the child folder.

    0 讨论(0)
  • 2021-01-29 02:37

    Based on your log it's looks like you are running yo in a folder where a .yo-rc.json is already existing. Careful under windows the .yo-rc.json can be that is of type hidden and you can't see it in explorer. Because of an existing .yo-rc.json you are not asked anymore for info e.g. project name, build tool etc. My recommendation will be to create a new folder run inside yo command

    0 讨论(0)
提交回复
热议问题