How to upgrade nativescript angular dependencies with the "tns update"? - nativescript

I want to upgrade my #angular dependencies in my package.json file.
I guess the documentation
http://docs.nativescript.org/releases/upgrade-instructions show some way to do it with : tns update. I upgraded my cli to 2.4 but upgrade doesnt work!!
i called tns --help and there is no appearance of update.
How can i update/upgrade the #angular dependencies into package.json file?

The #angular dependencies will not be updated from tns update.
The update command will update only the platform related dependencies and the reason your #angular dependencies won't be updated is because there are no guarantees that your current NativeScript CLI and runtime will work as expected with the last #angular updates.

Modify Package.json to include most latest version of dependency by prefixing symbol ^ to existing version number.Then delete all npm dependency from npm modules folder .Remove and add platform using cli commands
'tns platform remove android
tns platfrom add android '
it will download new packages from npm .But its better to go with default unless cli is updataed.

Related

Update dev dependencies using Poetry >1.20

In my pyproject.toml I have some dev dependencies configured as follows:
[tool.poetry.group.dev.dependencies]
mypy = "^0.971"
A simple poetry show -l shows that I indeed have mypy installed with version 0.971. Currently, the latest version available is v0.991.
What's the correct syntax to have all my dependencies - including dev dependencies - being updated.
poetry update --with=dev is not going to update mypy to the latest version.
poetry update updates dependencies within the version range given in the pyproject.toml.
^0.971 translates to >=0.971,<0.972 (See: https://python-poetry.org/docs/dependency-specification/#caret-requirements). This is why poetry update will not update mypy to 0.991.
To get the latest version of a dependency you have to use poetry add <dep>#latest. In your case poetry add -G dev mypy#latest.
At the moment there is no Poetry command to bump all dependencies to its latest version outside of the given version ranges. But there is a feature request for it: https://github.com/python-poetry/poetry/issues/461

bs-platform version mismatch

I have a global bs-platform installation and a local one for a local project. They are in different versions. Everything was fine until today. Every time I try to run my local project, the following error is thrown:
bs-platform version mismatch Running bsb 5.0.4 (/home/jefferson/.nvm/versions/node/v12.4.0/lib/node_modules/bs-platform) vs vendored 4.0.5 (/home/jefferson/astrocoders/lion-carne-client/node_modules/bs-platform)
How can this be solved? I'm using yarn.
You have a few options:
Use the locally installed package
a. Through a script defined in package.json, executed using yarn run or npm run
b. Through executing the command via npx, which comes with npm: npx bsb -make-world
Use the globally installed package by linking it into the project and overwriting any locally installed package of the same name, using either yarn link bs-platform or npm link bs-platform (only needed once per project). node_modules/bs-platform will then be a symlink that points to the globally installed package, hence no version mismatch when running the global bsb.

How do I install vuetify directly from github?

When I try with
npm install vuetifyjs/vuetify#v1.5.2
I get "Cannot find package".
UPDATE:
There is a packages folder under which there is a vuetify directory.
I tried npm installing that folder. Everything appeared to go well until I started the dev server.
Now in the console log I see:
[Vuetify] Multiple instances of Vue detected
Seems to be related to https://github.com/vuetifyjs/vuetify/issues/4068 but I cannot tell what the solution is at this point.
I had the same issue to use my own version of Vuetify, waiting for my pull request being accepted.
Here what I did:
I build the vuetify project with my fix.
yarn
yarn build
Then I took the content of 'packages/vuetify' and put it in a new git repository. I remove the .gitignore to be able to commit built files (/es5, /lib, /lib-temp, /dist)
Finally I add this git repository to my project to replace my vuetify version:
npm install git+https://gitlab.com/GITLABUSERNAME/REPOSITORYNAME.git
Looking at the package.json file, the package doesn't have a name property, which it would need to have for you to be able to install it from GitHub.
So the short answer is that you can't install vuetify directly from GitHub via npm.
However, you can install it directly from npm:
npm install vuetify#1.5.2
You can't install vuetify directly from GitHub but you can edit code in 1 component node_modules/vuetify/lib/components/VSlider/VSlider.js Then, you install patch-package and execute path package vuetify Delete node modules and execute yarn to create new node modules Last, yarn serve, you see your code is work
https://www.npmjs.com/package/patch-package

nativescript 5.1 and tns_modules folder in IOS build

I had this issue before with some app (N 4.1).
Now i'm doing another app, and i have the same issue :
First, im preparing build:
tns build ios --for-device --release --provision MY_Provision
Nativescript is doing build, so next i'm opening it in XCode, and doing some twaks like version number etc...
Lastly i'm doing "Archieve" and trying to Validate this archieve.
The result is error, in the previous app written in N 4.1 i had the same but with another plugin, and now validation throws: Invalid build structure - binary app/rns_modules.fstevents.lib/binding/Release/FILE NAME.
many errors regarding this folder.
So i've just removed this directory and done another archieve and validation - app passed the validation.
So, my question is - do i need such number of plugins in tns_modules ?
Or better question - is there any way to determine what is not needed ?
Or, am i doing something wrong when building an app ? As seems massive number of directories here and i'm wondering if maybe there is some kind of cleanup or something ?
For now, the only way to store an app is to validate first, check what is blocking validation, delete this, check if app works (:() and try again.
Thank you.
Below, attached, folder that is blocking validation and amount of dirs inside of tns_modules.
pacakge.json:
NativeScript CLI will prepare (i.e. copy) all packages declared in the dependencies section of your package.json (and their dependencies) in tns_modules. All devDependencies and their dependencies will not be copied to the native Xcode/Android Studio project.
So, all packages that are required only for building the application, should be installed as devDependencies. For example, such packages are nativescript-dev-webpack, nativescript-dev-typescript, etc.
Also, it looks like you have installed NativeScript CLI as a dependency of your project. By default, it should be installed globally, i.e. npm i -g nativescript. In case you omit the -g flag, npm will install it as dependency of your project.
You can try:
rm -rf platforms
npm un --save nativescript
Check package.json for other packages with -dev in their names and ensure they are in the devDependencies section.
After that run tns build ios --forDevice.

How to remove sass plugin from Nativescript?

I did tns install sass and now I want to remove it.
I tried tns plugin remove nativescript-dev-sass and tns plugin remove sass with no success!
How can I get rid of it? It is really annoying me and I don't want to use it.
when I do tns plugin I get
Dev Dependencies:
nativescript-dev-sass
But the command tns plugin remove nativescript-dev-sass gives this message: Plugin "nativescript-dev-sass" is not installed.
Or, how can I avoid sass compiler being called when I do tns run android ?
Try
npm uninstall nativescript-dev-sass

Resources