nativescript-mediafilepicker icon indicating copy to clipboard operation
nativescript-mediafilepicker copied to clipboard

Update tns-core-modules to @nativescript/core

Open danielorihuela opened this issue 4 years ago • 11 comments

Good morning jibon57,

Thanks for the development of an amazing plugin including camera and gallery functionalities, we find it very useful. However, your plugin currently depends on tns-core-modules (which seems deprecated: https://www.npmjs.com/package/tns-core-modules). Nativescript team recommends using @nativescript/core instead.

We would like to make a request of updating the imports to the recommended package by the Nativescript team, not by us.

Thanks for your time.

danielorihuela avatar Jun 18 '20 08:06 danielorihuela

Nativescript 7 no longer supports tns-core-modules, so this update is critical for anyone upgrading. @jibon57 is this fix on your radar? We appreciate the work you have put into it.

mreall avatar Sep 21 '20 16:09 mreall

Not really, we were able to solve it by setting some aliases in our webpack configuration. So if anyone has a similar problem he can do that. Thanks for all @mreall.

danielorihuela avatar Sep 23 '20 20:09 danielorihuela

@mreall @danielorihuela would you guys please share the solution? It's so bad there's a solution but the community can't see it :)

csimpi avatar Sep 30 '20 12:09 csimpi

@csimpi you have to go in to the alias section of your webpack config and add a new alias for tns-core-modules. Example:

alias: {
    "tns-core-modules": "@nativescript/core",
    "nativescript-angular": "@nativescript/angular"
}

https://webpack.js.org/configuration/resolve/#resolvealias

danielorihuela avatar Sep 30 '20 13:09 danielorihuela

@danielorihuela Thank you! It seems this has already been a part of my webpack and still having issues with NS7 :(

csimpi avatar Sep 30 '20 13:09 csimpi

Considering how long this and other issues have been open with no feedback from @jibon57, I ultimately had to go with another plugin.

mreall avatar Sep 30 '20 14:09 mreall

@mreall Is there any reliable file-picker plugin for nativescript? I didn't find any suitable replace.

csimpi avatar Sep 30 '20 14:09 csimpi

I only need images and videos right now, so I'm using @nativescript/imagepicker. But I may need to allow picking documents in the future, so I initially went with this plugin. I hope it gets updated soon to fix the increasing backlog of issues.

mreall avatar Sep 30 '20 15:09 mreall

@mreall BTW, I'm trying to update this to NS7 I'll let you know if you can test my forked version. Maybe I can do it within a reasonable time.

csimpi avatar Sep 30 '20 15:09 csimpi

Hello everyone, I'm no longer using NativeScript now. Will be happy to get some contributor.

jibon57 avatar Sep 30 '20 15:09 jibon57

@jibon57 - Thank you for the update! We're working on the migration with the NS community, I'll update you guys with the fork's address soon. Maybe tomorrow. Basically forking this and making these changes can be a temporary solution: https://nativescript.org/blog/nativescript-7-for-plugin-authors/

csimpi avatar Sep 30 '20 16:09 csimpi