Open mjarkk opened 5 years ago
Sorry again for not responding earlier; is this still a problem or did you get it to work? I will try to find out which component throws that error and tomorrow try your code
Since the error seems to be during the install routine which is just yarn
by default could you maybe try:
yarn
manually in the remote directoryremote-code --install "npm install"
insteadThat didn't work.
remote-code --install "npm install"
gave the same error
yarn
also didn't work
I now also have nodemon installed on my client and host.
When i ssh into my server there is folder named: remote-sync
in /root with the host's files.
When i run yarn start
or npm start
on my server they both execute the scripts.
In my package.json i have a main
defined.
Files in host's dir:
-rw-r--r-- 1 mark users index.js
drwxr-xr-x 3 mark users node_modules
-rw-r--r-- 1 mark users package-lock.json
-rw-r--r-- 1 mark users package.json
-rw-r--r-- 1 mark users yarn.lock
Using a random dependencies just to have something in the dependencies
also didn't work.
Does running the install command (either yarn
or npm install
) on the machine itself work?
Jup they both work on the host and on the client
hey @mjarkk sorry for taking so long. I can confirm the same behavior with my setup. However instead of trying to fix the old version I am currently working on getting the latest master
commit working. There were several changes in the dependencies that I would like to get published.
That's oke i found this project interesting and wanted to try it out.
Could you please try it with the npm i -g remote-code@next
version?
For me the following command works remote-code -i ~/.ssh/id_rsa pi@robby5 -p 2221 -S ls -t "~/debug"
using your example files
Just tried it and there seem to be a view errors.
Here are the problems.
SSH identity file does not exist: undefined
📦 dependency installation started
shutting down remote-code
but it doesn't stop (If i press a second time ctrl+c it would be nice to have a force close)Preview:
Note: That error is because i killed the app via a task manager.
Ahh, are you not using a private key to authenticate your SSH connection? How do you log into the remote machine usually?
That might explain also you previous error
just do ssh root@machine.com
and i'm in, I have multiple private keys stored in ~/.ssh/
In there i also have a config
file with a list of all my keys
IdentityFile ~/.ssh/someEmail@gmail.com
IdentityFile ~/.ssh/id_rsa
...
well good thing I figured out where the type error is coming from. I always assumed that people use a keyfile, that's why it tried to read an unspecified path resulting in this error. The catch I introduced recently makes sure that there always is a keyfile used - but I am not really happy with that. But there is something in the dependencies I use that results in a weird state (same you had). I have to work on the error handling for this one.
I cloud not get this tool to work..
Due to this error:
My package .json:
The contents of index.js:
Env information
The host (my laptop)
uname -r
: 4.20.0-arch1-1-ARCHlsb_release -a
The client (my server)
uname -r
: 4.4.0-140-genericlsb_release -a