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

Version lock bun to lower than 1.0.4 for now #2522

Closed
frankcalise opened this issue Oct 11, 2023 · 14 comments · Fixed by #2523
Closed

Version lock bun to lower than 1.0.4 for now #2522

frankcalise opened this issue Oct 11, 2023 · 14 comments · Fixed by #2523

Comments

@frankcalise
Copy link
Contributor

frankcalise commented Oct 11, 2023

Problem

bun test doesn't pass on version 1.0.5 after a project is generated, however it does on 1.0.3. This was detected on ci in #2513

Enhancement

Update the cli to version check for bun if it's used as the package manager to help manage the user's expectations until they fix the issue in bun.

It would be great to add bun version to the doctor command as well

Related Issues

oven-sh/bun#4259

@markrickert
Copy link
Member

The workaround listed in this comment works if you are running bun > 1.0.4 in an ignited app: oven-sh/bun#4259 (comment)

Or to downgrade your local bun installation, you have to uninstall and then reinstall with this command: curl -fsSL https://bun.sh/install | bash -s "bun-v1.0.4"

@frankcalise
Copy link
Contributor Author

Might not be needed after 1.0.6 lands: oven-sh/bun#6421

But we should still add the version to doctor so we can catch if people have a lower version than latest

@jamonholmgren
Copy link
Member

@frankcalise frankcalise linked a pull request Oct 12, 2023 that will close this issue
2 tasks
@Jarred-Sumner
Copy link

Let me know if you are still running into issues

@frankcalise
Copy link
Contributor Author

@Jarred-Sumner hey still seeing issues with 1.0.6 installing via bun now as well. If I drop back down to 1.0.4, it works out.

npx ignite-cli@next new PizzaAppNextBun --packager=bun --verbose --overwrite --yes results in:

    ⠸ Installing bun dependencies (wow these are heavy)
/Users/fcalise/.npm/_npx/2351a7c35afcf833/node_modules/gluegun/build/index.js:15
    throw up;
    ^
bun install v1.0.6 (969da088)
 Resolving dependencies
 Resolved, downloaded and extracted [1158]
 Saved lockfile
/bin/bash: /react-dompiz: No such file or directory

(Use `node --trace-uncaught ...` to show where the exception was thrown)

Node.js v18.11.0

@Jarred-Sumner
Copy link

Jarred-Sumner commented Oct 18, 2023 via email

@Jarred-Sumner
Copy link

@frankcalise can you give it another try on v1.0.7? This should be fixed along with more changes related to peer dependencies.

@frankcalise
Copy link
Contributor Author

@Jarred-Sumner yup, bun install works again now! thanks.

bun test will not complete due to not having all the jest matcher coverage, but for now we'll roll with bun run test and it'll work out

@frankcalise
Copy link
Contributor Author

@Jarred-Sumner as far as running our RN app, I have to add a bunfig.toml and disable peer installs for things to run correctly

@Jarred-Sumner
Copy link

@Jarred-Sumner as far as running our RN app, I have to add a bunfig.toml and disable peer installs for things to run correctly

This is not great. We are working on porting more tests from other package managers to bun install and hopefully that will more thoroughly catch this kind of bug.

For now, one thing you can try is removing your lockfile. rm -rf bun.lockb node_modules ~/.bun/install && bun install

@frankcalise
Copy link
Contributor Author

@Jarred-Sumner So that worked, but the process took about 900 seconds, but yarn ios boots up without errors now and no bunfig.toml present.

image

Afterwards, I deleted node_modules again and just ran bun install and it completed in 1100 ms

@jamonholmgren
Copy link
Member

jamonholmgren commented Oct 31, 2023

Probably related: I had this error:

 ERROR  Invariant Violation: View config getter callback for component `RNCSafeAreaProvider` must be a function (received `undefined`).
CleanShot 2023-10-30 at 18 33 44@2x

When I ran the above:

rm -rf bun.lockb node_modules ~/.bun/install && bun install

it took about 43 seconds, and then it worked fine after that.

CleanShot 2023-10-30 at 18 37 40@2x

@janwiebe-jump
Copy link
Contributor

@jamonholmgren Could this be related to the peer-depencencies bug that has been fixed in [bun 1.0.8]?(https://bun.sh/blog/bun-v1.0.8#bun-install-peer-dependency-duplicate-version-bugfix)

@frankcalise
Copy link
Contributor Author

Closing this as bun v1.0.10 no longer has this issue (maybe previous versions but I was coming off 1.0.7)

Will remove the bunfig from v9 which disabled peer install in a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants