nest new crashes when installing dependencies
This happens when picking either npm or yarn.
As I would think this is a system dependent issue, here are some details:
Nestjs-cli version: 5.1.2 installed via yarn.
Node version: v8.11.2 installed via NVM.
NPM version: v5.6.0 installed via NVM.
Yarn version: v1.6.0 installed as package via NPM.
OS: Ubuntu 18.04, linux
Simply running nest new [name] and hitting enter for all the questions triggers this crash.
? Which package manager would you ❤️ to use? yarn
▹▹▹▹▹ Take ☕️ or 🍺 during the packages installation process and enjoy your timeevents.js:183
throw er; // Unhandled 'error' event
^
Error: spawn /bin/sh ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
I assume this is somehow related to this "issue", and the culprit is this line. I was able to reproduce it removing the newly-created folder before this line is executed.
However, I have no clue why the project folder would not exist. I'm running Debian 9 here and I didn't experience this issue.
Hey guys ! After researches I found this https://github.com/nodejs/node/issues/11520 It could be linked to the issue 😢
@Raqbit What was the project name you were trying to generate (or something similar)?
@ThomRick I think you were right about the above mentioned issue with non kebab-case naming.
nest new test and nest new test-two works
nest new testTwo fails because it creates the directory test-two but expects the directory to be testTwo, which would explain the directory not being created.

No links between simple / kebab / camel case app name and the error.
The cli transforms the app name to be always in kebab case before calling the nest schematic collection.
You can type app name / app-name / App Name / appName / AppName the result will always be app-name.
@ThomRick I did some debugging and the non-dasherized directory/project name was being passed to the install method in new.action.ts (see right after the package manager selection).
A fix is here https://github.com/nestjs/nest-cli/pull/151

@josiahdahl Yes, I can confirm that the project was probably NestTest.