How to remove sass plugin from Nativescript? - sass

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

Related

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 install a NativeScript plugin from a forked repository?

I currently need to use the nativescript-https plugin but its repository is not updated and not packed to npm and it has a couple bugs (including one with AFNetworking with version) without a solution so I've forked the repository and try to add from this forked repo using:
tns pluging add [url of the repo]
this install the plugin with no errors, but when I try to run the app it shows the following error:
NativeScript encountered a fatal error: Error: Could not find module 'nativescript-https'
So I would like to know... which is the correct workflow to do this?
Compile and add the plugin folder to your package.json using relative path.
"myplugin": "file:myplugin/dist"
Assuming myplugin is your plugin folder placed at your project root, dist is where you have your compiled JS files.
The error wasn't related to the plugin installation, the problem was that I needed to run Typescript compiler on plugin's folder to generate the .js files.

React Native how to change iOS bundle identifier?

I tried to change the bundle identifier in the Info.plist and the xcode itself. (in full empty project).
But for some reason I can't build it. Entry, ":CFBundleIdentifier", Does Not Exist. And what strange is that I can build it successfully in the xcode but not with the npm run ios. Any idea how to solve this?
Try the react-native-rename npm package.
npm install react-native-rename -g
On the root of your React Native project execute the following command
react-native-rename "ExampleApp" -b com.newname.newid
Check the docs > react-native-rename

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

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.

sass source map issues on OS X Yosemite

I recently updated to OSX Yosemite and now, when I run Grunt and make changes to the sass file in my project, I receive the following error:
Warning: Error: Error generating source map: couldn't determine public URL for the source stylesheet.
No filename is available so there's nothing for the source map to link to.
on line of standard input
Use --trace for backtrace. Use --force to continue.
I have made no other changes to my Grunt setup or sass:dist, dependencies are unchanged and so forth. Any help resolving this would be greatly appreciated. Thanks!
This issue can have more than one reason, maybe this will help you.
Before starting remove the compiled css!
Update grunt-contrib-sass to the latest version
Sourcemap Requires Sass 3.4.0, which can be installed with gem install sass
Run grunt sass task and review compiled css.
When everything is updated, the sourcemap should be automatically created and available. Be sure to empty browser cache before testing in the browser.

Resources