TURI BLOG

[Team project] 01. Why is my cloned Github code showing errors on my local? 본문

Projects Logs

[Team project] 01. Why is my cloned Github code showing errors on my local?

TURI BLOG 2022. 1. 27. 16:59

Why is my cloned Github code showing errors on my local?

After cloning my team's code from the GitHub repository and running it on my local, I encountered error messages that prevented me from running the code.

 

I believe the errors are related to 'batch file' and here's an example of one :

 

Here's how I resolved the issues :

npm install -g react-scripts  
npm update
npm start 

The code lines I needed were quite simple. However, at this point, I'm wondering

What 'react-script' is and what it's used for?


Creating a React application requires you to set up build tools such as Babel and Webpack.
These build tools are required because React's JSX syntax is a language that the browser doesn't understand.

To run your React application, you need to turn your JSX into plain JavaScript, which browsers understand.

Create React App (CRA) is a tool to create single-page React applications that is officially supported by the React team.


* You can read more about this here :

<The React Scripts Start Command – Create-React-App NPM scripts explained>

Summary :

The command npm install react-scripts is to prepare your React development environment, setting a development dependency with 'react-scripts' in your project.

This package includes the necessary tools and configurations to handle processes like transforming JSX into Babel, bundling with Webpack, setting up a development server, and managing other development-related tasks.

 

 

 


 

Comments