OSX Priviledges stop node.js project being created in WebStorm

When I followed the defaults to create a node.js - express project in WebStorm, my Mac balked since I wasn't logged in with su privs.  When I attempted to create a command line launch script (located in the default location) via the Tools menu, I get this when I run it (via sudo or not):

Als-iMac:bin alspohn$ sudo -b ./wstorm2

Als-iMac:bin alspohn$ Traceback (most recent call last):

  File "./wstorm2", line 85, in <module>

    os.execv(RUN_PATH, [bin_file] + args)

OSError: [Errno 2] No such file or directory

Any suggestions on  how I can create a node.js - express project with this IDE?

Thanks,

Al

6 comments
Comment actions Permalink

Try running webstorm as administrator using 'sudo open -a /Applications/WebStorm.app/'

0
Comment actions Permalink

lena_spb wrote:

Try running webstorm as administrator using 'sudo open -a /Applications/WebStorm.app/'

Tried what you suggested and got this when I tried to create the project:
Screen Shot 2014-10-27 at 10.38.08 PM.png
Thanks,
Al

0
Comment actions Permalink

Dead in the water then?

0
Comment actions Permalink

Please try running

sudo chown -R $USER:$GROUP ~/.npm 


does it help?
0
Comment actions Permalink

NO! Do not run the IDE using sudo! That's a very, very bad idea. All of the privilege issues should be resolved in other ways.

0
Comment actions Permalink

My mistake, sorry - ‘open’ command always launches apps as the original user, with or without sudo:( sudo should point directly at the executable
But, as Charles has mentioned, running application as root is a bad idea - you will likely have permissions problems later, when running as normal user.
So I'd really suggest changing your permissions for

~/.npm instead
0

Please sign in to leave a comment.