Configure nodejs in linux, run vue tutorial, nodejsvue

Source: Internet
Author: User

Configure nodejs in linux, run vue tutorial, nodejsvue

1. Download nodejs (linux64) vuedemo

2. Put nodejs somewhere for decompression, for example, put it under/usr/local/nodejs? /Usr/local/nodejs/node-v8.9.3-linux-x64

3. go to the decompressed directory bin directory and execute ls to view the two files node, npm. then execute. /node-v. if the version number is displayed, the downloaded package is correct.

4. Run pwd in the node-v8.9.3-linux-x64/bin directory to get the PATH and add this directory to the path environment variable

1) vi/etc/profile

2) Add PATH to environment variables (case sensitive)

3): wq? Save

4) Run: source/etc/profile to make the variable take effect.

5) then run echo $ PATH to check whether the output content contains the added content: echo: $ PATH.

6) then execute node-v in any directory? Npm-v?

* It should be noted that during the installation process, the source/etc/profile is used to temporarily make the variable take effect, if I open a terminal at this time, the node will prompt that the command cannot be found. The problem is fixed after restart or logout,

5. Put the vue project in a place such as:/usr/local/nodejs/workspace/ES6-demo-master

6. cd to ES6-demo-master?

7. Execute? Npm run dev? An error is reported because the permission is insufficient.

8. Execute chmod-R u + x in this directory.

9. Then run npm run dev? What is the prompt port 8080? I don't know what it is, so I will try again later.

10. browser access?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.