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

Warning when using text-based Bun lockfile #9628

Open
1 task done
robertherber opened this issue Dec 18, 2024 · 4 comments · May be fixed by #9783
Open
1 task done

Warning when using text-based Bun lockfile #9628

robertherber opened this issue Dec 18, 2024 · 4 comments · May be fixed by #9783
Labels
bun kind: bug Something isn't working

Comments

@robertherber
Copy link

robertherber commented Dec 18, 2024

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/robertherber/repro-turbo-with-bun-text-based-lockfile

Which canary version will you have in your reproduction?

2.3.4-canary.3

Enviroment information

CLI:
   Version: 2.3.3
   Path to executable: /Users/robertherber/code/_play/turbo-bun-text-based/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: bun

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 25846
   Available CPU cores: 10

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): WarpTerminal
   Terminal program version (TERM_PROGRAM_VERSION): v0.2024.12.10.15.55.stable_03
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

I expect it to work without a warning.

Actual behavior

Getting a very noisy warning whenever I run a turbo command:

 WARNING  Issues occurred when constructing package graph. Turbo will function, but some features may not be available:
   × could not resolve workspaces
  ╰─▶ unable to parse: Parsing Error: Error { input: "one-plus-one@^workspace:packages/one-plus-one:\n  version \"workspace:packages/one-plus-one\"\n  resolved \"workspace:packages/one-plus-one\"\n  devDependencies:\n    \"@types/bun\" \"latest\"\n\nturbo@^2.3.3:
      \n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo/-/turbo-2.3.3.tgz\"\n  integrity sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==\n  optionalDependencies:\n    turbo-darwin-64 \"2.3.3\"\n    turbo-
      darwin-arm64 \"2.3.3\"\n    turbo-linux-64 \"2.3.3\"\n    turbo-linux-arm64 \"2.3.3\"\n    turbo-windows-64 \"2.3.3\"\n    turbo-windows-arm64 \"2.3.3\"\n\[email protected]:\n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo-darwin-64/-/turbo-
      darwin-64-2.3.3.tgz\"\n  integrity sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==\n\[email protected]:\n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-
      2.3.3.tgz\"\n  integrity sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==\n\[email protected]:\n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.3.3.tgz\"\n  integrity
      sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==\n\[email protected]:\n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.3.3.tgz\"\n  integrity sha512-NmDE/
      NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==\n\[email protected]:\n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.3.3.tgz\"\n  integrity sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/
      oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==\n\[email protected]:\n  version \"2.3.3\"\n  resolved \"https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.3.3.tgz\"\n  integrity sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/
      MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==\n\ntypescript@^5.0.0:\n  version \"5.7.2\"\n  resolved \"https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz\"\n  integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==\n\nundici-types@~5.26.4:\n
      version \"5.26.5\"\n  resolved \"https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz\"\n  integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==\n", code: Eof }

• Packages in scope: one-plus-one
• Running typecheck in 1 packages
• Remote caching disabled
one-plus-one:typecheck: cache miss, executing 284ac7686cc4f234
one-plus-one:typecheck: 
one-plus-one:typecheck: $ tsc --noEmit

 Tasks:    1 successful, 1 total
Cached:    0 cached, 1 total
  Time:    706ms

The command still works though.

To Reproduce

Here's a simple repo reproduction:
https://github.com/robertherber/repro-turbo-with-bun-text-based-lockfile

Just run bun typecheck in the root and the warning is there (as above).

Additional context

Using bun 1.1.39 with a text-based lockfile (verified I'm getting the same on 1.1.40 and 1.1.41).

@robertherber robertherber added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Dec 18, 2024
@carlosmfreitas2409

This comment was marked as duplicate.

@chris-olszewski chris-olszewski removed the needs: triage New issues get this label. Remove it after triage label Dec 23, 2024
@anthonyshew anthonyshew added the bun label Jan 13, 2025 — with Linear
@firtoz
Copy link

firtoz commented Jan 23, 2025

Update: the text based lockfile for bun (bun.lock) is now live with bun 1.2: https://bun.sh/blog/bun-v1.2 - January 22, 2025

@robertherber
Copy link
Author

Update: the text based lockfile for bun (bun.lock) is now live with bun 1.2: bun.sh/blog/bun-v1.2 - January 22, 2025

Yeah, now it's even on by default for new projects. So this just became more important :)

@chris-olszewski chris-olszewski linked a pull request Jan 24, 2025 that will close this issue
@raulfdm
Copy link

raulfdm commented Jan 24, 2025

I'm not only getting a warning but a full build failure.

envinfo 👇🏽

  System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 203.33 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.1 - ~/Library/pnpm/node
    npm: 10.5.2 - ~/Library/pnpm/npm
    bun: 1.2.0 - ~/.bun/bin/bun
    Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
  npmPackages:
    turbo: 2.3.3 => 2.3.3 

Using bun.lockb, building with turbo works as expected. Deleting this file and using bun.lock (text-based), because of this warning (probably something doesn't get resolved), the build breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants