Reputation: 12649
So I've been developing on another server and now I want to put it on the live one.
What I've done on the live server is run the initial create react app
create-react-app test
then I go inside and git init it
cd test
git init
Then I set up the remote
git remote add origin {link}
from here on is where I'm kind of confused
I do a git fetch remote origin
but am not sure what I should really do. A git pull
gives me issues, where I need to add files, then commit them. I try a pull but it doesn't seem to change the contents.
However, when I do a git checkout origin/redux
I get * (detached from origin/redux)
when I git branch
. The proper files seem to be there, but I'm not sure if this is safe.
Lastly, when I run npm run build
I get the following error:
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /var/www/html/test/node_modules/react-dom/lib
My package.json: http://pastebin.com/7UBDm2EV
Upvotes: 1
Views: 2237
Reputation: 6762
About git pulling :
If you are initialising git for this app why can't you just git clone that old app.
still If you want to do git init and pull old repo its fine.
you need to first add that old remote and get the old code by:
git pull old_remote to_ur_master
As it is new fresh repo it should-not show any conflicts on git status.
About react error:
It is due to old version of react loader.
Try updating it to the latest version:
$ npm install --save-dev react-hot-loader@latest
Upvotes: 1