作者 : kyle   时间 : 2018-07-18   浏览 : ...

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.

npm is the package manager for JavaScript and the world’s largest software registry. Discover packages of reusable code — and assemble them in powerful new ways.

If you do not have a package.json, create one before installing. This will ensure proper interaction with the npx command.

https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz

xz -d node-v8.11.3-linux-x64.tar.xz

tar -xvf node-v8.11.3-linux-x64.tar

mv node-v8.11.3-linux-x64 node

ln -s /usr/local/node/bin/node /usr/bin/node

node --version

ln -s /usr/local/node/bin/npm /usr/bin/npm

npm --version

ln -s /usr/local/node/bin/npx /usr/bin/npx

npx --version

原创文章如转载,请注明本文链接: http://www.seaxiang.com/blog/install_nodejs_npm_npx
seaxiang  All Rights Reserved   粤ICP备15083047号-1   阿里云折扣