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?