Coder Social home page Coder Social logo

Comments (4)

CaelumF avatar CaelumF commented on April 24, 2024
ng
>Connection refused...

whereis ng
>ng: /usr/bin/ng /usr/local/bin
sudo mv /usr/bin/ng /usr/bin/ng2
sudo mv /usr/local/bin/ng /usr/local/bin/ng2
sudo npm install -g @angular/cli
sudo ln -s /usr/lib/node_modules/@angular/cli/bin/ng /usr/local/bin/ng

ng
>ng build <options...> ...

Workaround for changing nailgun to ng2 and getting ng to refer to Angular CLI

from nailgun.

mckennapsean avatar mckennapsean commented on April 24, 2024

Did not work for me.

Running NailGun's ng command when installed (or nailgun on Ubuntu) without any parameters/args prints out the help text.

When you move the file (ng -> ng2, or basically ng -> *), then this breaks, and you get the "Connection refused" instead of the help text. At least for my company's build workflow, when I tried moving the NailGun executable, then our build stopped working, printing out "Connection refused".

Not sure why simply renaming the executable causes these issues unless it is hardcoded somewhere. You also cannot symlink it to any other name.

Here is the help text / version I am getting when it is successful:

NailGun v0.9.0

Usage: ng class [--nailgun-options] [args]
          (to execute a class)
   or: ng alias [--nailgun-options] [args]
          (to execute an aliased class)
   or: alias [--nailgun-options] [args]
          (to execute an aliased class, where "alias"
           is both the alias for the class and a symbolic
           link to the ng client)

where options include:
   --nailgun-D<name>=<value>   set/override a client environment variable
   --nailgun-version           print product version and exit
   --nailgun-showversion       print product version and continue
   --nailgun-server            to specify the address of the nailgun server
                               (default is NAILGUN_SERVER environment variable
                               if set, otherwise localhost)
   --nailgun-port              to specify the port of the nailgun server
                               (default is NAILGUN_PORT environment variable
                               if set, otherwise 2113)
   --nailgun-filearg FILE      places the entire contents of FILE into the
                               next argument, which is interpreted as a string
                               using the server's default character set.  May be
                               specified more than once.
   --nailgun-help              print this message and exit

from nailgun.

CaelumF avatar CaelumF commented on April 24, 2024

Could you give Angular CLI a different name instead?
ie
sudo ln -s /usr/lib/node_modules/@angular/cli/bin/ng /usr/local/bin/ang

from nailgun.

mckennapsean avatar mckennapsean commented on April 24, 2024

Oh, of course, that works fine to use Angular (and ultimately what I did to play with angular-cli).

The maintainers do not seem open to a name-change though. Feel free to see #111 for more on the issue with the binary. I am curious to see why so may dig into that issue when I have some spare time.

from nailgun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.