Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Lifecycle scripts are not executed + Cannot create bins that are generated by lifecycle scripts. #8591

Open
Umbranoxio opened this issue Jan 31, 2024 · 2 comments
Labels
bug Something isn't working windows An issue that is known to occur on Windows

Comments

@Umbranoxio
Copy link

Umbranoxio commented Jan 31, 2024

What version of Bun is running?

1.0.26-canary.101+2d9db9b28

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

bun init
bun i -d supabase

What is the expected behavior?

Running pnpm i throws the following warning

 WARN  Failed to create bin at \test\node_modules\.pnpm\[email protected]\node_modules\supabase\node_modules\.bin\supabase. ENOENT: no such file or directory, stat \test\node_modules\.pnpm\[email protected]\node_modules\supabase\bin\supabase.EXE'

So the postinstall script is still run and the package works fine

node_modules/.pnpm/[email protected]/node_modules/supabase: Running postinstall scripnode_modules/.pnpm/[email protected]/node_modules/supabase: Running postinstall script, done in 3s

What do you see instead?

Bun treats this warning as an error

bun install v1.0.26-canary.101 (2d9db9b2)
  📦 Installing [2/34]
error: linking supabase: ENOENT

 + @types/[email protected]
 + [email protected]

 33 packages installed [4.10s]

The postinstall script is never run, so running bunx supabase results in the terminal exiting with code 1

Additional information

No response

@Umbranoxio Umbranoxio added the bug Something isn't working label Jan 31, 2024
@Jarred-Sumner
Copy link
Collaborator

We aren’t running lifecycle scripts for Windows yet. This bug will be fixed today or tomorrow

@paperclover paperclover added the windows An issue that is known to occur on Windows label Jan 31, 2024
@paperclover
Copy link
Member

The bin linker is failing because the exe doesnt exist.

this is due to the lifecycle scripts situation, but

  • failing to link a bin like this should be an install failure. seeing error and a success makes little sense to an end user
  • i think the bin linker is run before the install script, and in this case we should not fail to link if the target doesnt yet exist

@paperclover paperclover changed the title Windows(?): Warning treated as error during dependency installation Windows: Lifecycle scripts are not executed + Cannot create bins that are generated by lifecycle scripts. Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows An issue that is known to occur on Windows
Projects
None yet
Development

No branches or pull requests

3 participants