-
Notifications
You must be signed in to change notification settings - Fork 5.9k
update npm installation docs with node requirements #2745
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
Comments
Hmm...I wish I had an Android device to try and reproduce this. Usually when you see this error, it means VSCode isn't done building. I see the "error VS Code exited unexpectedly with code 0". But since you already installed code-server with yarn, it should be finished 🤔 I wonder if that failed in some way. Maybe you can check the logs from after running |
There might be some helpful info here: https://stackoverflow.com/questions/55834349/what-is-the-path-to-yarn-error-log-files |
I tried to install it code-server over codeserver.dev/install.sh and noticed a lot of old or broken dependencies. I tried to run it as well and got a simular result. The only difference is my remote OS. It is a Raspberry Pi 4 4GB |
Well that's no good! Can you try following these steps and let me know if the result is the same? |
Im not quiet sure which steps i should follow. Could you link to the issue or the comment here? |
Sorry looks like the link didn't get added! Updated the comment |
I already tried that too but i got the error global is not a file when i executed yarn global ... |
Hmm..strange. Can you please post the logs or a screenshot so I can see if I can reproduce your error? |
Here is the process: Last login: Tue Mar 2 01:04:12 2021 from 192.168.2.xxx
pi@server:~ $ sudo apt update && apt upgrade
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Hit:3 https://deb.nodesource.com/node_14.x buster InRelease
Fetched 15.0 kB in 1s (11.8 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
pi@server:~ $ sudo apt install build-essential python git nodejs yarn
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'cmdtest' instead of 'yarn'
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u3).
python is already the newest version (2.7.16-1).
nodejs is already the newest version (14.16.0-1nodesource1).
The following additional packages will be installed:
libyaml-0-2 python-cliapp python-markdown python-pygments
python-ttystatus python-yaml
Suggested packages:
python-markdown-doc python-pygments-doc ttf-bitstream-vera
The following NEW packages will be installed:
cmdtest libyaml-0-2 python-cliapp python-markdown
python-pygments python-ttystatus python-yaml
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 892 kB of archives.
After this operation, 4,565 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf libyaml-0-2 armhf 0.2.1-1 [38.8 kB]
Get:2 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf python-yaml armhf 3.13-2 [118 kB]
Get:3 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf python-cliapp all 1.20180812.1-2 [42.2 kB]
Get:4 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf python-ttystatus all 0.38-2 [15.4 kB]
Get:5 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf python-markdown all 3.0.1-3 [60.6 kB]
Get:6 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf cmdtest all 0.32-3 [21.9 kB]
Get:7 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf python-pygments all 2.3.1+dfsg-1 [596 kB]
Fetched 892 kB in 2s (405 kB/s)
Selecting previously unselected package libyaml-0-2:armhf.
(Reading database ... 111866 files and directories currently installed.)
Preparing to unpack .../0-libyaml-0-2_0.2.1-1_armhf.deb ...
Unpacking libyaml-0-2:armhf (0.2.1-1) ...
Selecting previously unselected package python-yaml.
Preparing to unpack .../1-python-yaml_3.13-2_armhf.deb ...
Unpacking python-yaml (3.13-2) ...
Selecting previously unselected package python-cliapp.
Preparing to unpack .../2-python-cliapp_1.20180812.1-2_all.deb ...
Unpacking python-cliapp (1.20180812.1-2) ...
Selecting previously unselected package python-ttystatus.
Preparing to unpack .../3-python-ttystatus_0.38-2_all.deb ...
Unpacking python-ttystatus (0.38-2) ...
Selecting previously unselected package python-markdown.
Preparing to unpack .../4-python-markdown_3.0.1-3_all.deb ...
Unpacking python-markdown (3.0.1-3) ...
Selecting previously unselected package cmdtest.
Preparing to unpack .../5-cmdtest_0.32-3_all.deb ...
Unpacking cmdtest (0.32-3) ...
Selecting previously unselected package python-pygments.
Preparing to unpack .../6-python-pygments_2.3.1+dfsg-1_all.deb ...
Unpacking python-pygments (2.3.1+dfsg-1) ...
Setting up libyaml-0-2:armhf (0.2.1-1) ...
Setting up python-ttystatus (0.38-2) ...
Setting up python-markdown (3.0.1-3) ...
Setting up python-pygments (2.3.1+dfsg-1) ...
Setting up python-yaml (3.13-2) ...
Setting up python-cliapp (1.20180812.1-2) ...
Setting up cmdtest (0.32-3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi@server:~ $ yarn global add code-server
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'global'
pi@server:~ $ If you need a log, you have to help me where it is saved, because i have no idea |
Okay these might be dumb questions but bear with me.
I found this potential fix that might work? (source): sudo apt remove cmdtest
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn |
Wow thanks a lot. Till now no error |
Sure thing! If it ends up working, feel free to close this issue! |
Sadly it still breaks when i try to log in. :( 500VS Code failed to load. exited unexpectedly with code 0 Where can i see the logs of code-server |
Dang it! We were too optimistic too soon. Run code-server like so:
More info here in the docs. |
Here the console:
Still no success |
Those logs aren't very helpful. They don't tell us too much :( If VS Code is exiting, then I have to guess that there's a missing dependency or something. Honestly, we should have something like a Hmm...a few things:
That might help us get to the bottom of this |
In addition, here's a list of required dependencies to build with yarn: https://github.com/cdr/code-server/blob/v3.9.0/docs/npm.md#npm-install-requirements It might help to to re-install VS Code Node modules and post the log if there are any failures. Maybe something like:
|
Here is the install process of the libaries:
And here are the dependencies which show my first problem, where a lot of them are old or deprecated or moved
|
Great. All that looks fine to me. What version of
And have you tried the suggestion by @code-asher ? |
I have. It is the first log i commented above. Here the versions:
|
Ah, sorry missed that! Hmm...I wonder if it could be an issue with your node version. I know I've run into funky errors with local development and vscode itself recommends Can you try downgrading node versions to either something that is |
Im sorry to ask but how can i downgrade. I dont work that much with node |
No worries at all! I usually use a tool called What you'll do is something like:
|
It works now. Thanks a lot. :) |
I think we need to install the right version of node to make it working for other people. |
One thing, is there a easy way to rebuilt code-server if it is already installed? |
Yes, we should update the docs. I'll change this issue to match that. |
Hmm... sorry can you elaborate a little bit on what you mean? If you have it installed with |
If that works then it is ok |
Should we close this now? |
Sure |
But i cant close it |
ha! no worries, i can! |
actually, i still want us to update the docs. so we'll close after we do that! |
Thats a good idea |
You will need to use Node v16 with code-server, not v19. https://github.com/coder/code-server/blob/main/docs/termux.md |
code-server --version
: 3.9.0 fc6d123I tried to install on termux using falling commands
after then when I execute the command

code-server
orcode-server --auth none
and then I open url in chrome browser I get this errorthis is the log of termux while running

code-server
The text was updated successfully, but these errors were encountered: