ekatzenstein / create-react-app-fullstack

Use create-react-app as a full-stack tool, with Express and Sequelize (PostgreSQL)
MIT License
51 stars 13 forks source link

fullstack command does nothing #5

Open shingenko opened 7 years ago

shingenko commented 7 years ago

Issues is on Windows 10. I follow the below instructions: First off, I did make sure I had the correct packages installed.

create-react-app (works fine) cd (works fine) fullstack (command prompt logs: The system cannot find the path specified)

Not sure why it's not working...

shingenko commented 7 years ago

I did get it to run finally by setting up my node path and typing> node %node_path%\node_modules\create-react-app-fullstack\index.js

Now I get this error at the very end: 'rsync' is not recognized as an internal or external command, operable program or batch file. (node:78632) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Command failed: rsync -r C:\Users\shing\AppData\Roaming\npm\node_modules\create-react-app-fullstack\templates\ ./ 'rsync' is not recognized as an internal or external command, operable program or batch file.

supersime commented 7 years ago

+1... had both the same issues. I'm using Cygwin. I have create-react-app-fullstack installed globally, which is in the following path: C:\Users\<username>\AppData\Roaming\npm I modified the following files under this directory to make it all work:

fullstack:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  "$basedir/node"  "$basedir/node_modules/create-react-app-fullstack/index.js" "$@"
  ret=$?
else 
  node  "$basedir/node_modules/create-react-app-fullstack/index.js" "$@"
  ret=$?
fi
exit $ret

fullstack.cmd:

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\node_modules\create-react-app-fullstack\index.js" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node  "%~dp0\node_modules\create-react-app-fullstack\index.js" %*
)

and .\node_modules\create-react-app-fullstack\index.js - only changed this line:

exec('rsync -r ' + path.join(__dirname, 'templates/') + ' ./')

to this:

exec('xcopy /e "' + path.join(__dirname, 'templates') + '" .\\')

Hope this helps.

nenravitsa commented 7 years ago

It's work for me. Thanks a lot!

ghost commented 6 years ago

I was able to run fullstack command doing node ~/.nvm/versions/node/v8.9.1/bin/fullstack in project's root folder

dorbenisti commented 6 years ago

I had this problem too and thanks to @supersime I can run it now.

Please fix this issue for windows users.