Error when I do "npm install"


  • GNU/Linux

    I do "npm install" and at the end I obtain this error:

    npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
    npm ERR! argv "/home/vagrant/.nvm/v7.2.0/bin/node" "/home/vagrant/.nvm/v7.                      n/npm" "install"
    npm ERR! node v7.2.0
    npm ERR! npm  v3.10.9
    npm ERR! path /vagrant/nodebb/node_modules/nyc/node_modules/yargs/node_mod                      indow-size/cli.js
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall chmod
    
    npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/nodebb/                      odules/nyc/node_modules/yargs/node_modules/window-size/cli.js'
    npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/nodebb/                      odules/nyc/node_modules/yargs/node_modules/window-size/cli.js'
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /vagrant/nodebb/npm-debug.log ```
    
    What I can do to avoid this?

  • Community Rep

    Does the user you're running npm install as have permission to create files in that folder?


  • GNU/Linux

    @Bri I think it can be a plugin, is it possible? If it is a plugin what I have do to avoid this error? Because this error is throw when I launch the ./nodebb dev for the second time, because for the first time it work but for the second time is not work.


  • Community Rep

    From the directory you're running your commands in, what do these output:

    whoami
    ls -la


  • GNU/Linux

    @Bri when I execute the "whoami" command the output is "vagrant" and after when I execute "ls -la" the result is:

    0_1480504609269_whoami.png

    the script "avviaCentos.sh" is a script that I created first but I don't use it.


  • Community Rep

    This is run from your home folder. Can you do the same command in your nodebb directory?


  • GNU/Linux

    @Bri yes sorry. So I go in /vagrant/nodebb and I run "whoami" and the result is "vagrant". So I run "ls -la" and the result is:

    0_1480599588916_vagrant.png


  • Community Rep

    Did you install node (via nvm) as root (i.e. sudo nvm install...)


  • GNU/Linux

    @Bri Yes I did. I follow this guide to install nodebb:

    I installed node 7.0.0


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.