Forums

Yarn support

I can I somehow install yarn? I cannot use npm because my projects uses yarn specific features.

You could download an install it into a subdirectory of your home directory -- then you'd need to modify your path (in your .bashrc) to point to your installation. So, for example:

cd ~
wget https://yarnpkg.com/latest.tar.gz
tar zvxf latest.tar.gz

...this would install yarn in a yarn-[version]/ directory in your home dir. You could use ls to find out what it's called, then modify your .bashrc so that it adds the bin subdirectory of that directory to your PATH:

export PATH="$PATH:/home/kaifis/yarn-[version]/bin"

Then start a new Bash console and try running it from there.

I copy pasted those commands and got:

Error: ENOENT: no such file or directory, uv_resident_set_memory
at process.memoryUsage (internal/process.js:103:5)
at ConsoleReporter.checkPeakMemory (/home/kaifis/yarn-v1.19.1/lib/cli.js:33565:40)
at ConsoleReporter.initPeakMemoryCounter (/home/kaifis/yarn-v1.19.1/lib/cli.js:33556:10)
at /home/kaifis/yarn-v1.19.1/lib/cli.js:92172:14
at Generator.next (<anonymous>)
at step (/home/kaifis/yarn-v1.19.1/lib/cli.js:304:30)
at /home/kaifis/yarn-v1.19.1/lib/cli.js:322:14
at new Promise (<anonymous>)
at new F (/home/kaifis/yarn-v1.19.1/lib/cli.js:5301:28)
at /home/kaifis/yarn-v1.19.1/lib/cli.js:301:12

I even tried to install yarn via npm thanks to nvm (https://help.pythonanywhere.com/pages/Node) with node v10.16.0 which is supposed to be the latest supported.

Then after running

npm install --global yarn

I got the same error as with manual installation

It looks like it won't work now on PythonAnywhere due to lack of availability of /proc for users.

We plan to make it possible. W will let you know.

Our new virtualization system, which should fix this problem, is now ready for beta-testing :-) If you'd like us to switch it on for your account, please log in then use the "Send feedback" link at the top of the page to send us a message requesting that we do so.

Has this been resolved globally? I am running into this issue as well with vscode-server

Error: ENOENT: no such file or directory, uv_resident_set_memory at process.memoryUsage (node:internal/process/per_thread:163:5)

yarn installs and works fine, in general. What is the rest of the error?

So I would get this error and the vscode extension would shut down

Error: ENOENT: no such file or directory, uv_resident_set_memory at process.memoryUsage (node:internal/process/per_thread:163:5) at _0x423ef7._getMemoryUsage (/home/jwahl/.vscode-server/extensions/ms-python.vscode-pylance-2024.10.1/dist/server.bundle.js:1:1152728) at _0x423ef7.updateTelemetry (/home/jwahl/.vscode-server/extensions/ms-python.vscode-pylance-2024.10.1/dist/server.bundle.js:1:1151485) at _0x3ac4ca._sendTelemetry (/home/jwahl/.vscode-server/extensions/ms-python.vscode-pylance-2024.10.1/dist/server.bundle.js:1:1027514) at /home/jwahl/.vscode-server/extensions/ms-python.vscode-pylance-2024.10.1/dist/server.bundle.js:1:1025147

2024-10-08 19:31:03.307 [info] [Error - 7:31:03 PM] Server process exited with code 1. 2024-10-08 19:31:03.309 [info] [Error - 7:31:03 PM] Pylance has crashed 5 times in the last 3 minutes. Pylance will not be restarted.

What are you trying to run and how? How is the VSCode involved?

I use vscode to remote develop and I ssh into pythonanywhere. there are extensions that require some system level access to manage itself like Pylance

As far as I know it would not work as access to /proc when connecting to PythonAnywhere over ssh is very limited.