NativeScript / docs-v8

https://docs.nativescript.org
29 stars 42 forks source link

proposal for less invasive environment installation under GNU/Linux #55

Open gentooza opened 2 years ago

gentooza commented 2 years ago

Hi!

I'm trying out nativescript, I come from ionic development but I don't like it's governance model (and business model neither!)

I want to share my method for preparing my environment, as I think is less invasive with my OS (Ubuntu GNU/Linux 20.04) (no ubuntu ppas needed, nothing downloaded with no future updates either, leaving a cleaner environment):

For installing node, I use python virtual environments and nodeenv:

sudo apt install python3-virtualenv

in project folder I create it, and activate it:

virtualenv .python_env
source .python_env/bin/activate

now, in ptyhon virtual environment I can install nodeenv for node virtual environments:

(.python_env) pip install nodeenv
(.python_env) nodeenv .env

deactivate python environment, and safely remove it, activating now node virtualenvironment

(.python_env) deactivate
rm -r .python
source .env/bin/activate

And now we can work!!

(.env) npm install -g nativescript
(.env) etc.

for Android Studio I use snap, as it is very updated for java the default 1.8 version of openjdk is stable and works. (ubuntu 20.04 has also versions 11, 13, 16 and 17 in its repositories but I have never test them, and can be problematic as I need version 8 for other software from state administration) What I don't find is version 14!

cheers and happy hacking!

rigor789 commented 2 years ago

The docs try to be least opinionated about the environment setups - so while this approach is convenient, it requires knowledge of python3-virtualenv and would generally be harder for us to provide assistance for.

We can think of an alternate place to keep this information accessible however, so I'll keep this open - perhaps we could have a "how-to" section in the docs for information like this that isn't necessarily endorsed as "the recommended way", but still useful to share for those who are already familiar with these tools and would like to use them.