NodeJS install

Ubuntu 18.04 LTS, installed Node.js, encounter problems npm unsuccessful:
Depends the: the Node-gyp (> = 0.10.9)

Referring to the article Q & problem solving

To summarize command to install:

Ubuntu Server 18.04 Node.js and npm install

sudo apt remove --purge nodejs npm
sudo apt clean
sudo apt autoclean
sudo apt install -f
sudo apt autoremove

Find the latest version at https://github.com/nodesource/distributions#debinstall Latest version 10.x now

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install yarn

npm -version
6.1.0
nodejs -v
v10.7.0

sudo npminstall -g cnpm --registry=https://registry.npm.taobao.org

sudo cnpm install -g vue-cli

 

launch.json

vscode debugging VUE modify the startup file

{
    // use IntelliSense understanding of the relevant property.
    // hover to see the existing property description.
    // For more information, please visit: https://go.microsoft.com/fwlink/?linkid=830387
    "Version": "0.2.0",
    "the Configurations": [
        {
            "name": "Chrome" ,
            "of the type": "Chrome",
            "Request": "Launch",
            "url": "HTTP: // localhost: 8080 /",
            "webRoot": "$ {workspaceRoot}"
        },
        {
            "name": " Core Launch the .NET (Console) ",
            " of the type ":" CoreCLR ",
            " Request ":"

            "program": "${workspaceFolder}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "console": "internalConsole",
            "stopAtEntry": false,
            "internalConsoleOptions": "openOnSessionStart"
        }
    ]
}
 

Guess you like

Origin blog.csdn.net/rubbertree/article/details/89974152