authjs-nuxt icon indicating copy to clipboard operation
authjs-nuxt copied to clipboard

[yarn] postinstall 'nuxi prepare' fails due to not having nuxi in path

Open oviava opened this issue 1 year ago • 5 comments

Environment

This is happening locally and on CI

Reproduction

Use 'yarn' in CI, or use 'yarn install <<this_package>>'

Describe the bug

The postinstall scripts assumes nuxi exists in global path

Additional context

Can we remove this please ?

Logs

[4/4] Building fresh packages...
error /builds/xapp/node_modules/@hebilicious/authjs-nuxt: Command failed.
Exit code: 127
Command: nuxi prepare
Arguments: 
Directory: /builds/xapp/node_modules/@hebilicious/authjs-nuxt
Output:
/bin/sh: nuxi: not found

oviava avatar Sep 28 '23 14:09 oviava

@oviava I assume you are trying to contribute/fork this repo ? If so, you should be using bun, not yarn.

Hebilicious avatar Sep 30 '23 08:09 Hebilicious

Hey @Hebilicious, the issue occurs when doing ‘yarn add’ or when doing ‘yarn’ on our project. Unfortunately we do not have the option of using anything but yarn atm. Basically the library can’t be used under projects that use yarn.

I did fork it and made the fixes we needed. I understand if you only want to use it under bun.

oviava avatar Sep 30 '23 08:09 oviava

Hey @Hebilicious, the issue occurs when doing ‘yarn add’ or when doing ‘yarn’ on our project. Unfortunately we do not have the option of using anything but yarn atm. Basically the library can’t be used under projects that use yarn.

I did fork it and made the fixes we needed. I understand if you only want to use it under bun.

I would expect yarn to find nuxi when running scripts. Regardless, this error can be safely ignored if you are consuming the package. I'll leave this open for a future fix though.

Hebilicious avatar Sep 30 '23 09:09 Hebilicious

'yarn install' is failing, I wish I could ignore it but it's failing our CI :)

oviava avatar Sep 30 '23 09:09 oviava

'yarn install' is failing, I wish I could ignore it but it's failing our CI :)

You'll find several options to ignore the installation scripts in the yarn docs https://classic.yarnpkg.com/lang/en/docs/cli/install/

Hebilicious avatar Sep 30 '23 09:09 Hebilicious