Why does npm need sudo for EVERYTHING?

后端 未结 3 1719
耶瑟儿~
耶瑟儿~ 2021-01-14 14:59

I don\'t know how I\'ve managed it but npm seems to need sudo for absolutely every command, even npm help does not work without sudo. If I use a co

3条回答
  •  野的像风
    2021-01-14 15:25

    Take ember project for example, I give all related project directory root:

    neil@neil-System-Product-Name:~/Projects/ember-quickstart$ sudo chown -R $(whoami) /home/neil/Projects/ember-quickstart/ neil@neil-System-Product-Name:~/Projects/ember-quickstart$ ember s Could not start watchman Visit https://ember-cli.com/user-guide/#watchman for more info. Livereload server on http://localhost:7020 Build successful (10679ms) – Serving on http://localhost:4200/ Slowest Nodes (totalTime => 5% ) | Total (avg)
    ----------------------------------------------+--------------------- Babel (18) | 7561ms (420 ms)
    Concat (8) | 1872ms (234 ms)
    Rollup (1) | 629ms

提交回复
热议问题