Error starting npm start

1

When I run npm start in my terminal it gives me the following error:

npm ERR! Linux 4.13.0-38-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"

I do not know what the error is. Could someone help me out?

    
asked by Marifer Villarroel 19.04.2018 в 21:27
source

1 answer

1

This error can be solved in two ways:

  • Reinstall npm with a version manager, I leave the link that explains step by step how to do it Reinstallation
  • Change the directory where npm is manually installed
  • For this second step you should do the following:

    • Create a folder for global installations

      mkdir ~/.npm-global
      
    • Set up the new npm route

      npm config set prefix '~/.npm-global'  
      
    • Open or create a file ~ / .profile and add this line:

      export PATH=~/.npm-global/bin:$PATH
      
    • Back on the command line, update the variables of your system:

      source ~/.profile
      
    • Test: Download a package globally without using sudo.

      npm install -g jshint
      

    You can read each step more detailed in the Official Documentation

        
    answered by 19.04.2018 в 21:48