In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to build a React development environment, many people may not know much about it. In order to make you understand better, the editor summarizes the following content for you. I hope you can get something according to this article.
Download and install ① from Node.js
Baidu search Node.js download will see the official website address, open you can see as shown here, according to their own computer operating system to choose to download installation package, slide down the optional historical version to download.
two
double-click to download the installation package, no brain next step (next), in the middle can change the installation directory.
Note: the installation process is omitted here
three
opens the cmd command window, and type node-v to view the version. The installation is successful as shown in the figure.
four
checks whether the npm command is supported, enter npm-v to check the version, and display the version indicates that the installation is successful.
Note: installed with Node.js, no additional installation is required
five
installs the cnpm command. The default image is slow. We need to switch to the image installation on Taobao: npm install-g cnpm-- registry= https://registry.npm.taobao.org. After the installation is successful, you can enter cnpm-v to check whether the installation is successful.
Note: here is a brief description of npm and cnpm. Npm is the official package image command, and cnpm is the domestic Taobao image command.
Second, create the React project ①
installs the module cnpm install-g create-react-app that creates the React project
two
changes to the project space directory, creates the React project react-demo, and enters the creation command create-react-app react-demo to create in the current directory. Omit N lines of installation information in the middle. Successful creation of React project
three
to create a completed project we need to cut to the project directory and execute the npm start startup command to run the project. We can see the startup success log in the following figure.
four
The browser accesses the path in the startup success log: http://localhost:3000/, which counts as a successful creation of the React project.
3. Common npm commands use command interpretation commands to explain npm install module name-g installation dependent module, plus-g global installation, otherwise local installation npm uninstall-g module name uninstall dependent module, add-g global uninstall, otherwise local uninstall npm install module name-g install dependent module, add-g global installation Otherwise install npm install module 1 module 2 module n-save install multiple modules npm start startup project npm run build package build project (build as static file)
After reading the above, do you have any further understanding of how to build a React development environment? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 230
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.