Closed dangrima90 closed 3 months ago
@dangrima90 Thanks for the detail report. If i understand correctly i think the issue is with the nativescript cli calling npm install (if you did not do it before) without installing peer dependencies. Could be a flag the cli passes to the install command. The difference with material core is that it is not a peer dependency. May be you can report it on the cli repo.
In the meantime I just published a new version which remove the requirement for ui-canvas if you are only using SVGView
@farfromrefug thank you for the update. I've been discussing this on discord and it does seem a cli issue. It's been mentioned to me here that nativescript cli passes --legacy-peer-deps
when installing dependencies so most likely that's the reason for it.
I will close the issue as it's not a library issue per se. Still thanks for the updated version :)
Sorry for not following the template but this is not exactly a code issue and I do not think it's related to any particular NativeScript version or version of the plugin.
Something curious that I've noticed is that if I have an application which uses
@nativescript-community/ui-svg
its peer dependencies are not always installed. This depends on which command is run. Strange? I guess so 😄.. to explain:Let's say we have an application that uses
@nativescript-community/ui-svg
and nonode_modules
have been installed yet. If the installation is done via the "nativescript commands", i.e., vians build android
,ns debug android
,ns run ios
, and so on in thenode_modules
you should only see@nativescript-community/ui-svg
installed.Very curious as
ui-svg
has a peer dependency onui-canvas
which means that npm should install it automatically. Now the next curious thing is that ifnpm install
is executed, all the peer dependencies are then installed.Images to showcase the behaviour:
@nativescript-community
dependencies in the project:After running
ns debug android
:After running
npm install
:Above you can see that now
ui-canvas
has been installed. Note that there's other@nativescript-community
packages due to peer dependencies from internal libraries. Honestly I don't know if it's a NativeScript CLI issue or not. I noticed this whilst testing outui-svg
so sorry if it's not related to the library itself.It's just curious that for example the
ui-material-core
was installed when runningns debug android
, howeverui-canvas
wasn't. I know that I can installui-canvas
in my project directly (which I've tried), but that would mean that I would also need to installarraybuffers
library in my project as well.Some extra infromation:
Node Version: v20.10.0 NPM Version: v10.5.2