at nodejs.org, is the linux tar file going to work on cygwin - node.js

I need to get node.js for a program I'm installing in Cygwin, and I'm wondering if the Linux download at nodejs.org is going to work, or does something like this for Cygwin need to be built from source? I tried downloading the linux tarball and incorporating into the installation script for Oppia (the program I'm installing) and it doesn't work, but I don't know enough about this to know what's wrong.

I suppose node.js on cygwin is not really supported. I worked with node.js under cygwin, installed with Windows installer. There are some problems, especially when there are dependencies on paths (/cygdrive/c/...). I haven't tried to build from source, but asked the guys on the node.js google group a similar question, but they just said: not supported.
So probably it's better to write those unbelievable ugly .bat/.cmd scripts and use the DOS shell commands when working with Windows (which I hate so much). I tried to use PowerShell, but it was no improvement, it's odd compared to bash.

Related

nvm with WSL for projects stored in Windows

I'm struggling to understand how exactly WSL works.
The training that I'm doing requires nvm so I can manage my node versions in my project, located in my hard drive that is running with Windows.
So, in order to use nvm I need WSL, but I cannot comprehend where it is located. As far as I understood (and I'm pretty sure that I'm wrong) the WSL that I installed is like a Linux VM, completely independent from my Windows, and I operate it through the Ubuntu Terminal that came with WSL. If that's the case, how can nvm in WSL be useful if my project is in my Windows directory and the WSL controls node versions from my Linux VM?
How do I make nvm useful for my project running from my C:\ drive and how does WSL work with nvm in my Windows?
Thank you!
A few options, but each has advantages and disadvantages:
If your Node/JavaScript files are on your Windows C:\ drive, then you do have the ability to access that from WSL. Windows paths are automatically mounted and accessible in WSL via /mnt/c, /mnt/d, etc.
So if you have your JS source in, for example:
C:\Users\<myusername>\Documents\Projects\JS_class\project1\
Then that would be accessible under Ubuntu in WSL via:
/mnt/Users/<myusername>/Documents/Projects/JS_class/project1/
The disadvantage here is performance, as mentioned in this question.
Alternatively, you can store your project files inside WSL. You can access the WSL path from Windows by using \\wsl$\Ubuntu\home\<yourusername>\ (or similar). You can use this to copy from your existing Windows drive to your WSL distribution.
Advantage: Faster. Disadvantage: Unknown -- You seem to want the files to be in Windows, but I'm not sure why.
Or you can use WSL1 for most Node/JS tasks. See the previously mentioned answer for details on how to convert.
Advantage: Speed
Disadvantage: WSL1 hasn't been updated in a while, and is started to run into some compatibility issues. It's still popular enough and stable enough at the moment for me to continue to recommend it, though.
There's also a Windows version of nvm as well as a replacement project that the repo there mentions. I cannot personally speak for the quality of it, but it does have 23k stars on Github. Note that it is not affiliated with the original (Linux-based) nvm project.

How to develop Linux + Windows application with WSL2 and Visual Studio C++ 2019 using the same vcpkg dir?

recently I started to use WSL & vcpkg, but it has some problems when mixing windows + linux development.
It seems like that installing Linux packages or Windows packages with vcpkg, mutually damage the vcpkg configuration and then vcpkg roughly says: "the package you want to install doesn't exist". (I know for sure that it exist)
If it matters, the project is located in the windows "world" so the WSL directing to it with /mnt/c/Users//workspace/proj1
but it really doesn't matter.
Does Anyone already encountered this problem?
Am I doing something wrong?
Is there a better way to develop a cross-platform project?
Thanks
So I post it to help anyone who have doubts about it:
Don't mix WSL project with windows project because it will force you to work on the windows filesystem from WSL. (WSL can work on the windows filesystem with /mnt/)
anyway, It will both corrupt the vcpkg and the overall compile times will be horribly slow from linux filesystem (usually ext4) to the windows filesystem (NTFS).
this is my original post in the Github:
https://github.com/microsoft/vcpkg/issues/13948#issuecomment-706625438

How to install Weechat?

I must admit i'm not much of a coder or computer scientist, but in the past a friend installed Weechat on my windows computer using Cygwin (via the Cygwin terminal of course). I have a new computer now thats running windows 8.1 and have installed Cygwin with all of the necessary packages, and downloaded the latest stable version of Weechat (1.2). I am stuck from there though and don't really know which direction to move in, the only thing I have done with Cygwin so far is moved the home terminal folder to a more easier accessible location. Would it be possible to get a step by step walkthrough of how the installation progresses after downloading both the Cygwin component and the Weechat files and scripts?
Before we you can start using WeeChat, there are a few other pieces of software you need to install with CygWin. WeeChat relies on them for its functionality, which is why they are called dependencies.
You can find a detailed list of dependencies and further instructions on this link:
Weechat on Windows
Feel free to ask for further help if the above guide wouldn't suffice.
EDIT
WeeChat is currently available via the CygWin native repositories.
Simply search for weechat in the CygWin package manager.
I already have CygWin installed, what now?
No worries, simply rerun the setup-x86-64.exe* you've downloaded. This process won't remove any of your previously installed packages. At the end of the installation process you'll be able to look for and install WeeChat.
* (on 32-bit systems, the installer would be named setup-x86.exe)

Configuring GraphicMagick 1.3.19 in Cygwin

I'm trying to use Octave instead of MATLAB in order to run the Motion tracking software found here :
http://www.stats.ox.ac.uk/~wauthier/tracker/
To run octave I am using Cygwin. I've run into the issue that the GraphicsMagick configuration that comes with Cygwin is set to: --with-quantum-depth=16 when I need: --with-quantum-depth=32. I have installed and configured the same version of GraphicsMagick elsewhere on my computer. My question is how can I configure the pre-existing GraphicsMagick so that I may handle the larger images I need or how can I configure octave inside Cygwin to use the other install of GraphicsMagick.
While Searching I came upon this:
http://jethomson.wordpress.com/2010/08/22/enable-octave-to-read-16-bit-images/
I am hesitant to use this as it uses Debian and I am unsure how to modify it in order to work in Cygwin.
Any advice would be greatly appreciated.

Update nodejs in cygwin

Sometime back I've installed nodejs via cygwin which shows me the version 0.4.12 when I do node -v in bash.
Recently I've installed nodejs with the window installer which shows me the version 0.10.20 in window command prompt.
My Problem is I'm using Claymate for GumbyFramework in cygwin and it requires nodejs version above 0.8.0. How can I update the Nodejs in cygwin to the latest version?
Btw I'm using Windows Vista OS.
Pls. help!! Thanks in Advance..
Please know that Cygwin is not a supported platform. There would be a node version which would break things for you. The latest version that compiles natively on Cygwin is 0.4.12. Though the wiki page mentions some people had success building Node.js 0.10 on MinGW+MSYS. Try the following instructions : http://opensourcepack.blogspot.co.uk/2013/06/nodejs-with-posix-path-support.html
Don't mess with compile on Windows. You may want to just replace the old version Node.exe file with the newer Node.exe file on disk. You should be able to find the Cygwin folders within Windows explorer. You can search the entire disk, in windows not cygwin, for the file name node.exe. You should see the node.exe windows is finding, and the one cygwin is finding, under the cygwin folders.
Rename the cygwin node.exe and copy in the newer node.exe. Now, you nay get an issue with npm, in which case you may want to try the same thing with the npm folder.
I know cygwin isnt officially supported, but when you get it installed correctly it works.

Resources