nodejs npm npx安装

  • 2018-07-18
  • 浏览 (0)

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.

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