Installing electron globally on Ubuntu with NPM

前端 未结 1 939
再見小時候
再見小時候 2020-12-22 04:59

Attempting to resolve this question and getting the following error when installing electron globally with NPM:

    ole@mki:~/angular-electron$ sudo npm inst         


        
相关标签:
1条回答
  • 2020-12-22 05:24

    As npm proposes:

     mkdir ~/.npm-global
     npm config set prefix '~/.npm-global'
     export PATH=~/.npm-global/bin:$PATH
     source ~/.profile
    

    By doing it this was you keep your global npm packages scoped within your user account, instead of shared between all the users in the computer. Even if you're the only user, this is a recommended behavior. :-)

    0 讨论(0)
提交回复
热议问题