Git Product home page Git Product logo

Comments (6)

iangreenleaf avatar iangreenleaf commented on July 20, 2024

Sorry, I'm not sure I understand the problem. What command is your script trying to run? Was your script working previously until you upgraded supervisor or changed something else?

from node-supervisor.

ralyodio avatar ralyodio commented on July 20, 2024

I was running supervisor from a startup script in /etc/init.d and it complained that supervisor not find node
This is the startup script I was using at default runlevel (for starting node when debian system reboots):
https://github.com/chovy/node-startup/blob/master/init.d/node-app

Just replace node with supervisor
EXEC=/usr/local/bin/supervisor

It did not have a problem when I run it manually, only when the system rebooted did I get the error in my log.
My guess is it tried to run before a shell was available, but I'm not sure.

edit: actually, I think it had a shell, the startup script is a bash script, but node probably isn't in the path. The way you're getting node:

/usr/sbin/env | node

This was the problem.

from node-supervisor.

iangreenleaf avatar iangreenleaf commented on July 20, 2024

Ok, I see. Is there any other way that would work better? We can't just hardcode the path to node in there.

from node-supervisor.

ralyodio avatar ralyodio commented on July 20, 2024

hardcoding it would probably fix the issue. But then anyone who is not using standard /usr/local/bin/node path it will break for. Maybe there's a way to to both. /usr/local/bin/node || /usr/sbin/env | node

from node-supervisor.

iangreenleaf avatar iangreenleaf commented on July 20, 2024

Right, just like with other languages, it's not safe to assume that the node binary is in any one place.

Your best bet is probably arranging to have node in your path by the time your script runs. If that's not an option, I'd recommend forking this repository and maintaining a modified version that works for you. npm plays nice with GitHub - you can install directly from a repository like this: npm install -g https://github.com/isaacs/node-supervisor/tarball/master.

from node-supervisor.

ralyodio avatar ralyodio commented on July 20, 2024

I think this will fix it adding this to the system boot script:

PATH=/usr/local/bin:$PATH

from node-supervisor.

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.