Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Update tns-core-modules to @nativescript/core #113

Open
danielorihuela opened this issue Jun 18, 2020 · 11 comments
Open

Update tns-core-modules to @nativescript/core #113

danielorihuela opened this issue Jun 18, 2020 · 11 comments

Comments

@danielorihuela
Copy link

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.

@mreall
Copy link

mreall commented Sep 21, 2020

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.

@danielorihuela
Copy link
Author

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.

@csimpi
Copy link

csimpi commented Sep 30, 2020

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

@danielorihuela
Copy link
Author

@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

@csimpi
Copy link

csimpi commented Sep 30, 2020

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

@mreall
Copy link

mreall commented Sep 30, 2020

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

@csimpi
Copy link

csimpi commented Sep 30, 2020

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

@mreall
Copy link

mreall commented Sep 30, 2020

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.

@csimpi
Copy link

csimpi commented Sep 30, 2020

@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.

@jibon57
Copy link
Owner

jibon57 commented Sep 30, 2020

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

@csimpi
Copy link

csimpi commented Sep 30, 2020

@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/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants