Closed corydeppen closed 6 years ago
The error is caused by this line of code: https://github.com/fusionjs/fusion-scaffolder/blob/master/index.js#L116
The problem is that windows considers yarn.cmd
to be the correct name for yarn. The solution is found in this post on StackOverflow: https://stackoverflow.com/questions/37459717/error-spawn-enoent-on-windows
I'm brand new to npm module development, so it'll be a few days before I figure out how to make and test this fix myself, someone who is already familiar with the module can feel free to make the fix if they see this first ;)
I'm hopeful the fix is as simple as installing cross-spawn
and changing the require statement to use cross-spawn
.
Oops, I missed that comment and wasn't familiar with cross-spawn
. Someone is free to open up a pull request though if they want to clean up the code a bit.
This was fixed by: https://github.com/fusionjs/fusion-scaffolder/pull/47#pullrequestreview-143419791
We're currently doing by-weekly releases, but I'll see if we can get a release out for this sooner rather than later.
Type of issue
Bug
Description
I'm unable to create a new Fusion app on Windows. I've tried using Yarn and npm and neither will produce the app without the error mentioned below. I've seen several other similar issues across different repos mention using cross-spawn, so I'm hoping that might be a straightforward fix if this is confirmed to be an issue.
Current behavior
Expected behavior
App is successfully created without an error.
Steps to reproduce
Yarn seems to have enough current issues running on Windows, so I'm using npm at the moment.
npm i -g create-fusion-app
create-fusion-app fusion-app-test
Your environment
node --version
): 8.11.3npm --version
): 5.6.0