Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTiago Loriato
1,108 PointsAfter I completed these steps I wanted to download my work but...
Hello!
Thanks for the course, it's been great.
I do, however, have encounter a barrier.
After completing these exercise I wanted to download my work to display on my github address. I realized that I have to build it locally using the terminal, but I'm not aware on how to do this. I searched through the web but got stuck in certain steps.
How can I make my workspace ready to upload to the web?
Thank you!
(Win7 x64)
2 Answers
Jacob Mishkin
23,118 PointsI'm guessing you're using workspaces, and you want your code to be on github. My only suggestion is to copy and paste your code to a local text editor. I don't think you can upload from work spaces.
Seth Kroger
56,414 PointsIf you click on the File menu above the editor tabs in Workspace you'll see "Download Workspace" at the bottom. It will download the files packed up into a zip file and from their you can extract them. The React Basics project doesn't use any additional build tools, so it should be good to go once you unpack it. I suspect you're not copying the files in the vendor folder, which are necessary for the React app to run, but they be in the zip file.
Seth Kroger
56,414 PointsAlso check out this workshop: GitHub in Workspaces
Jacob Mishkin
23,118 PointsThat sounds good to me. I don't really use Workspaces that much, so thanks! good to know.
Tiago Loriato
1,108 PointsThanks for the input Seth Kroger !
However, I did select the Download Workspace option, unzipped to a separate folder and tried to open the HTML. The React code doesn't run, just the static html. I have the folder vendor with the JS files in there. I can upload this somewhere else if you feel like taking a look.
Jacob Mishkin : I can only run through Workspace. What do you mean build system? I do not have babel running locally. Should I? I thought I had to build the project somehow and them uploaded it to GitHub, but now I'm not so sure.
Tiago Loriato
1,108 PointsTiago Loriato
1,108 PointsJacob Mishkin I tried that, but didn't work. I'm guessing that I need to build with some command line code using npm first and then upload the bundle
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 Pointscan you run your code only in workspaces and not locally? are you using a build system? like super cell? do you have Babel running locally?
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 PointsI downloaded the project files. It looks like you are using babel so that is not an issue. If you look at the console and if you are using chrome, there is a notification:
Download the React DevTools and use an HTTP server (instead of a file: URL) for a better development experience: https://fb.me/react-devtools
My advice would be to download the requested dev tools and maybe this will solve the problem. and also use a local server.
Github: I assume you have a repo set up. I use Bitbucket, but they are pretty much the same, In the repo look for an upload link and choose the files you want to push to your repo. that should do it.
Tiago Loriato
1,108 PointsTiago Loriato
1,108 PointsThank you!
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 Pointsdid it work?
Tiago Loriato
1,108 PointsTiago Loriato
1,108 Points@Jacob Mishkin , to be honest, not quite.
I, however, managed to solve the issue.
My react code was on a .jsx file initially. I copied it down to a .js file and included in the first lines:
Then I removed these lines in my index.html and added the last one:
Created a package.json in the root:
and build it and tested with:
This is an the result and the repo
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 PointsAwesome!! It worked for me, so that's great. I'm glad you figured it out.