ui-canvas icon indicating copy to clipboard operation
ui-canvas copied to clipboard

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

Open CatchABus opened this issue 1 year ago • 3 comments

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

  • ns clean
  • ns run

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.

CatchABus avatar Jul 24 '24 13:07 CatchABus

@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

vallemar avatar Jul 24 '24 14:07 vallemar

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

CatchABus avatar Jul 24 '24 14:07 CatchABus

@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

farfromrefug avatar Jul 25 '24 07:07 farfromrefug