Did you start Atom from the command line? atom . code example
Example: how can I run atom?
Click on Packages --> Commmand Palette --> Select Toggle.
Type Install Packages and Themes.
Search for Script and then install it.
Press Command + I to run the code (on Mac)