nativescript-community / ui-canvas

Implement Canvas into your NativeScript apps.
https://nativescript-community.github.io/ui-canvas/
Apache License 2.0
31 stars 9 forks source link

bug: Arraybuffers peer dependency is not getting installed during ns run #56

Open CatchABus opened 1 month ago

CatchABus commented 1 month ago

Please, tell us how to recreate the issue in as much detail as possible.

When hitting ns run, NativeScript CLI will attempt to install node modules. However, CLI will append --legacy-peer-deps by default and this prevents arraybuffers peer dependency from being installed.

This is the parameter appended by CLI: https://github.com/NativeScript/nativescript-cli/blob/main/lib/node-package-manager.ts#L50 Steps to reproduce

Reverting @nativescript-community/arraybuffers back to being a regular dependency in package.json will probably solve the problem.

I found this on ui-canvas but might be affecting more plugins.

vallemar commented 1 month ago

@CatchABus It will surely affect more things, I don't know if it's something that has changed in the cli but I encountered this problem a couple of months ago, I have also seen people talking about this on discord. It seems that per-dependencies are not downloaded

CatchABus commented 1 month ago

@CatchABus It will surely affect more things, I don't know if it's something that has changed in the cli but I encountered this problem a couple of months ago, I have also seen people talking about this on discord. It seems that per-dependencies are not downloaded

Found a discord thread about it: https://discord.com/channels/603595811204366337/1253070269690413241

I tend to think --legacy-peer-deps is quite overused and we could resolve conflicts using overrides if any, but many people will get even more confused if we suddenly removed it from CLI, not to mention they're too lazy to handle conflicts themselves :smile: .

By the way, this is an npm-specific problem but since the majority uses that, we should ensure dependencies get installed.

farfromrefug commented 1 month ago

@CatchABus @vallemar i think there is an issue with the CLI (dont really care never use npm :P) but also on the plugin side. I will revert to to a dependency