Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at launch of the program #71

Closed
PrincesseLulu opened this issue Apr 26, 2017 · 36 comments
Closed

Error at launch of the program #71

PrincesseLulu opened this issue Apr 26, 2017 · 36 comments

Comments

@PrincesseLulu
Copy link

Hi i have an error when i launch the program

This is my informations :
Node Version: 4.2.6
tiny-core-terminal version: 1.1.1
Shell: zsh
Terminal Program: D'ont now the default for ubuntu 16.04..
Operating System: Linux, ubuntu

And my error:
` ~ tiny-care-terminal
Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
at Function.Module.runMain (module.js:444:11)
at startup (node.js:136:18)
at node.js:966:3
events.js:141
throw er; // Unhandled 'error' event
^

Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)`

@juliomfreitas
Copy link

same thing for me, basically the same configuration, but using bash

@DanielAndreasen
Copy link

What happens if you run the standup-helper.sh manually. You have the path to the file in your error message.
Try run: sh standup-helper.sh /path/to/git/repo

@PrincesseLulu
Copy link
Author

Nothing, no message.. The script during 5/6 sec and stop without error message

@DanielAndreasen
Copy link

Are you able to run: git-standup -d /path/to/git/repo. Note the -d flag.
If this doesn't work, you need to install it with npm install -g git-standup.

@PrincesseLulu
Copy link
Author

I can do this command without problem

@DanielAndreasen
Copy link

Sorry, that's as far as I can help.

@PrincesseLulu
Copy link
Author

No problem, thanks you

@notwaldorf
Copy link
Owner

You should always install it with npm install -g git-standup, to be on the safe side

@PrincesseLulu
Copy link
Author

Yes i have do that and re do now but alwas the error

@DanielAndreasen
Copy link

Can you return the output of these two commands:

which git-standup
npm bin -g

It is maybe a problem with a path somewhere.

@PrincesseLulu
Copy link
Author

which git-standup: /usr/local/bin/git-standup
npm bin -g: /usr/local/bin

@chuck-amuck
Copy link

I have the exact same issue with the same setup.

@morojgovany
Copy link

Same issue for me with the same error

    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

OS : Debian 8 Jessie
which git-standup /usr/local/bin/git-standup
npm bin -g /usr/local/bin
node --version v4.4.5
shell bash

@EatZeBaby
Copy link

Issue for me too

Error: spawn sh tiny-care-terminal/standup-helper.sh ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn sh tiny-care-terminal/standup-helper.sh ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

which git-standup \AppData\Roaming\npm\git-standup
npm bin -g \AppData\Roaming\npm
node --version v4.4.3
shell zsh

@jihelhere
Copy link

I had the same problem.
I solved it by replacing

'sh ' + __dirname + '/standup-helper.sh'

with

__dirname + '/standup-helper.sh'

in care.js lines 119 and 127

Hope this helps

@PrincesseLulu
Copy link
Author

@jihelhere i have test your solution but change nothing for me 😞

@jihelhere
Copy link

You should not get the exact same error message, right ?

@PrincesseLulu
Copy link
Author

I'v say i haven't not any one message, no good message, go bad message. Program execution betwen 5 and 8 sec and program exit.

@chuck-amuck
Copy link

chuck-amuck commented May 2, 2017

@jihelhere For me after making your change, I get a new error:

Error: spawn EACCES
    at exports._errnoException (util.js:870:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:362:9)
    at doTheCodes (/usr/local/lib/node_modules/tiny-care-terminal/care.js:119:15)
    at tick (/usr/local/lib/node_modules/tiny-care-terminal/care.js:49:3)
    at Object.<anonymous> (/usr/local/lib/node_modules/tiny-care-terminal/care.js:43:1)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

The error I was getting previously was:

Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)
    at Function.Module.runMain (module.js:444:11)
    at startup (node.js:136:18)
    at node.js:966:3
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)

@jihelhere
Copy link

@charlesdarnay the previous error meant that
sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh
is not a file (ENOENT) which is true, because it's a command made of a program (sh) and a file name.

My understanding of the new error (EACCESS) is that you do not have permission to run /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh

@chuck-amuck
Copy link

chuck-amuck commented May 4, 2017

@jihelhere thank you so much! After doing some research, I was able to fix the issue by adjusting the permissions on the standup-helper.sh. For context, I ran the below command to fix the permissions:
sudo chmod -R a+rwx /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh

So just to confirm for any one with the same issues I was having: I was able to resolve them by following instructions provided by @jihelhere and then fixing permissions on the standup-helper.sh script.

@PrincesseLulu
Copy link
Author

@charlesdarnay with you solution i have this error:
`Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
at Function.Module.runMain (module.js:444:11)
at startup (node.js:136:18)
at node.js:966:3
events.js:141
throw er; // Unhandled 'error' event
^

Error: spawn sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
`

@chuck-amuck
Copy link

@PrincesseLulu Did you first modify care.js lines 119 and 127 as recommended by @jihelhere ?

@PrincesseLulu
Copy link
Author

@charlesdarnay Yes..

@chuck-amuck
Copy link

@PrincesseLulu Because that is the exact error I was getting before I applied his changes. It is unable to find the referenced file.
It looks like it is still trying to find
sh /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh
Which will never work as sh is not a valid part of the file name.

@PrincesseLulu
Copy link
Author

It's possible i have do a pull request i retry

@PrincesseLulu
Copy link
Author

@charlesdarnay okay no my error is
/usr/local/lib/node_modules/tiny-care-terminal/care.js:127
var week = spawn(__dirname + '/standup-helper.sh', config.repos], {shell:true});
^^^^^

SyntaxError: missing ) after argument list
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

@chuck-amuck
Copy link

chuck-amuck commented May 6, 2017

@PrincesseLulu It looks like you might have removed too much from line 127.
Mine looks like:
var week = spawn(__dirname + '/standup-helper.sh', ['-m ' + config.depth + ' -d 7', config.repos], {shell:true});
And it looks like yours is:
var week = spawn(__dirname + '/standup-helper.sh', config.repos], {shell:true});

But it also looks like the repo has been updated a bit since I last installed it.

@PrincesseLulu
Copy link
Author

@charlesdarnay Thank the program is run !
I do a pull request for fix it in 2/3 days ;)

@arlemi
Copy link

arlemi commented May 9, 2017

I ran into the same issue and fixed it following @jihelhere and @charlesdarnay instructions (thanks!).
I'm using oh-my-zsh on macOS 10.12.3.

@germyjen
Copy link

germyjen commented May 11, 2017

I tried following @jihelhere and @charlesdarnay 's instructions, and am still seeing an error after chmoding the file:
used: sudo chmod -R a+rwx /usr/local/var/nodenv/versions/4.7.0/lib/node_modules/tiny-care-terminal/standup-helper.sh

now receive:
Error: spawn /usr/local/var/nodenv/versions/4.7.0/lib/node_modules/tiny-care-terminal/standup-helper.sh~/Code ENOENT at exports._errnoException (util.js:907:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:189:32) at onErrorNT (internal/child_process.js:355:16) at nextTickCallbackWith2Args (node.js:458:9) at process._tickCallback (node.js:372:17) at Function.Module.runMain (module.js:443:11) at startup (node.js:139:18) at node.js:990:3

I'm using zsh on Mac OSX with npm and nodenv

@chuck-amuck
Copy link

chuck-amuck commented May 11, 2017

@germyjen Check the changes you made in the care.js file.

It looks like you are getting the ENOENT error (not a file) because it is trying to find:
/usr/local/var/nodenv/versions/4.7.0/lib/node_modules/tiny-care-terminal/standup-helper.sh~/Code
Note the ~/Code at the end of the file name. It should end with just standup-helper.sh.

@germyjen
Copy link

You're right, I fixed the problem :) thank you

@notwaldorf
Copy link
Owner

As of version 1.2.0 there's a new way to use the terminal that doesn't involve the bash script, that should fix your problem. To use that, set the TTC_GITBOT environment variable to gitlog. This will become the default way in the future, I'm just giving it a bit of time in the wild before switching to it

@taylor-kim
Copy link

@jihelhere
thank you nice comment.
work well~

summary:

  1. open file : /usr/local/lib/node_modules/tiny-care-terminal/care.js
  2. replace text
    as is : 'sh ' + __dirname + '/standup-helper.sh'
    to be : __dirname + '/standup-helper.sh'
  3. sudo chmod 755 /usr/local/lib/node_modules/tiny-care-terminal/standup-helper.sh

@mojoaxel
Copy link
Collaborator

since 1.2.0:

  • linux/mac: export TTC_GITBOT=gitlog
  • Windows set TTC_GITBOT=gitlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests