Giter VIP home page Giter VIP logo

Comments (27)

BleedingDev avatar BleedingDev commented on September 28, 2024 2

Today I've run into this issue when trying to build docker image. Here is my Github Action output:
NaucMeIT/web/actions/runs/10587556981/job/29338499413

Is there something more you need, @jaysoo? Current code is in the repository, I keep fighting with Prisma + Nx + Bun combo and this just another issue that popped up after I moved forward with Prisma issue. :(

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Have you got a public repo i can check it out. I maybe link to a previous issue

from nx.

flipcasa avatar flipcasa commented on September 28, 2024

@Jordan-Hall

getting the following error
argument 'value' must be either string of Buffer
points to @nx/webpack/src/plugins/generate-package-json-plugin.js:39:82

this happens with nestjs project with generatePackageJson true

i tested with [19.2.0-beta.0]

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

@Jordan-Hall

getting the following error argument 'value' must be either string of Buffer points to @nx/webpack/src/plugins/generate-package-json-plugin.js:39:82

this happens with nestjs project with generatePackageJson true

i tested with [19.2.0-beta.0]

Have you got a repro I can check feels strange all testing around that code and not seen that issue :( even outside and ove been using this as a patch since last year

from nx.

flipcasa avatar flipcasa commented on September 28, 2024

@Jordan-Hall
getting the following error argument 'value' must be either string of Buffer points to @nx/webpack/src/plugins/generate-package-json-plugin.js:39:82
this happens with nestjs project with generatePackageJson true
i tested with [19.2.0-beta.0]

Have you got a repro I can check feels strange all testing around that code and not seen that issue :( even outside and ove been using this as a patch since last year

sorry for the delay @Jordan-Hall
this is the repo https://github.com/flipcasa/nxbun

from nx.

mikeallisonJS avatar mikeallisonJS commented on September 28, 2024

having this same or similar issue here:
https://github.com/JesusFilm/core/tree/24-03-MA-feat-bun-package-manager

works fine in my personal repo, but not this one

no error on 19.1, on 19.2-beta2 I get:

Please open an issue at `https://github.com/nrwl/nx/issues/new?template=1-bug.yml` and provide a reproduction.

Original error: Target project does not exist: npm:string-width@npm:string-width@^4.2.0


Error: Target project does not exist: npm:string-width@npm:string-width@^4.2.0
    at validateCommonDependencyRules (/workspaces/core/node_modules/nx/src/project-graph/project-graph-builder.js:323:15)
    at validateDependency (/workspaces/core/node_modules/nx/src/project-graph/project-graph-builder.js:313:5)
    at /workspaces/core/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:214:80
    at Array.forEach (<anonymous>)
    at /workspaces/core/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:205:49
    at Array.forEach (<anonymous>)
    at /workspaces/core/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:203:72
    at Array.forEach (<anonymous>)
    at /workspaces/core/node_modules/nx/src/plugins/js/lock-file/yarn-parser.js:200:26
    at Array.forEach (<anonymous>)

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

@jaysoo I believe this maybe a issue with bun.

project-graph/project-graph-builder.js:323:15

Im sorry i've taken a look and i'm unsure about this.

When using yarn i get the following error:
Error: Both project and target have to be specified
at parseRunOneOptions (/home/jordan/dev/core/node_modules/nx/src/command-line/run/run-one.js:102:15)
at Object.runOne (/home/jordan/dev/core/node_modules/nx/src/command-line/run/run-one.js:25:18)
at async handleErrors (/home/jordan/dev/core/node_modules/nx/src/utils/params.js:9:16)
at async Object.handler (/home/jordan/dev/core/node_modules/nx/src/command-line/run/command-object.js:28:9)
Done in 0.59s.

bun on right yarn on the left https://www.diffchecker.com/o6qeyfg7/ If i run bun install string-width@^4.2.0 it goes to the next one.

Sorry i cant be more help here

from nx.

cskiwi avatar cskiwi commented on September 28, 2024

Hi,

As mentioned in the PR now having a different error when updating to beta-5
Might be something in the project itself, i'm debugging right now

Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
  AggregateCreateNodesError: An error occurred while processing files for the nx/js/dependencies-and-lockfile plugin.
    - bun.lockb: Command failed: bun <redacted>\bun.lockb
  [0.00ms] ".env"
  ============================================================
  Bun v1.1.10 (5102a944) Windows x64
  Args: "bun" "<redacted>\bun.lockb"
  Features: dotenv
  Elapsed: 10ms | User: 0ms | Sys: 0ms
  RSS: 26.65MB | Peak: 26.65MB | Commit: 62.65MB | Faults: 6657

  panic(main thread): Internal assertion failure
  oh no: Bun has crashed. This indicates a bug in Bun, not your code.

  To send a redacted crash report to Bun's team,
  please file a GitHub issue using the link below:

   https://bun.report/1.1.10/wa15102a94AgIgyo6L+o9vI6kr4F+hwC2nkxFogoxFmvtyFqn4BiiJo3ht+CA0eNrzzCtJLcpLzFFILC5OLSrJzM9TSEvMzCktSgUAiSkKPg


      at createNodesFromFiles (<redacted>\node_modules\nx\src\project-graph\plugins\utils.js:58:15)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async LoadedNxPlugin.createNodes.<computed> (<redacted>\node_modules\nx\src\project-graph\plugins\internal-api.js:41:28)
      at async Promise.all (index 5)
      at async processFilesAndCreateAndSerializeProjectGraph (<redacted>\node_modules\nx\src\daemon\server\project-graph-incremental-recomputation.js:148:43)      
      at async getCachedSerializedProjectGraphPromise (<redacted>\node_modules\nx\src\daemon\server\project-graph-incremental-recomputation.js:46:16)
      at async handleRequestProjectGraph (<redacted>\node_modules\nx\src\daemon\server\handle-request-project-graph.js:12:24)
      at async handleResult (<redacted>\node_modules\nx\src\daemon\server\server.js:107:16)
      at async handleMessage (<redacted>\node_modules\nx\src\daemon\server\server.js:78:9)
      at async <redacted>\node_modules\nx\src\daemon\server\server.js:45:9

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Yea that's a different issue to one fixed in PR. This related to this issue im struggling tk debug because it's the yarn parser I believe

from nx.

cskiwi avatar cskiwi commented on September 28, 2024

So from what I can see it's just the problem of running bun bun.lockb that is still causing this. running it on a smaller poject in the command line returns the dependencies, while in the big project this crashes

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Agree why I'm unsure. They a set error message if it was buffer. The one I debug it looms like lock file maybe wrong installing package directly in package.json it worked fine.

Bun lock contains 6000 more likes than standard yarn lock

from nx.

flipcasa avatar flipcasa commented on September 28, 2024

@Jordan-Hall

getting the following error argument 'value' must be either string of Buffer points to @nx/webpack/src/plugins/generate-package-json-plugin.js:39:82

this happens with nestjs project with generatePackageJson true

i tested with [19.2.0-beta.0]

Have you got a repro I can check feels strange all testing around that code and not seen that issue :( even outside and ove been using this as a patch since last year

sorry for the delay @Jordan-Hall

this is the repo https://github.com/flipcasa/nxbun

@Jordan-Hall did you get a chance to try out this repo

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Yes 1 I was debugging. Looks like yarn and bun producing completely different lock. I installed the package it complained about and it worked fine :/

from nx.

cskiwi avatar cskiwi commented on September 28, 2024

Hmm found something interesting now, If i run bun install -y to create a yarn compatible file found on: https://bun.sh/docs/install/lockfile

This also crashes, so might be time to move this to the bun github as it looks like this is something on their side

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Hmm found something interesting now, If i run bun install -y to create a yarn compatible file found on: https://bun.sh/docs/install/lockfile

This also crashes, so might be time to move this to the bun github as it looks like this is something on their side

It doesn't respect the yarn lock. But it could well be with bun because yarn not producing same file. Bun.locb is a self execution of that bun install -y

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

@Jordan-Hall
getting the following error argument 'value' must be either string of Buffer points to @nx/webpack/src/plugins/generate-package-json-plugin.js:39:82
this happens with nestjs project with generatePackageJson true
i tested with [19.2.0-beta.0]

Have you got a repro I can check feels strange all testing around that code and not seen that issue :( even outside and ove been using this as a patch since last year

sorry for the delay @Jordan-Hall this is the repo https://github.com/flipcasa/nxbun

Using yarn on that repo failed for me too.

from nx.

flipcasa avatar flipcasa commented on September 28, 2024

@Jordan-Hall

getting the following error argument 'value' must be either string of Buffer points to @nx/webpack/src/plugins/generate-package-json-plugin.js:39:82

this happens with nestjs project with generatePackageJson true

i tested with [19.2.0-beta.0]

Have you got a repro I can check feels strange all testing around that code and not seen that issue :( even outside and ove been using this as a patch since last year

sorry for the delay @Jordan-Hall this is the repo https://github.com/flipcasa/nxbun

Using yarn on that repo failed for me too.

its weird it keeps failing for only nestjs projects
it's working fine on node/js projects

from nx.

cskiwi avatar cskiwi commented on September 28, 2024

Here also nestjs,

Also the same package.json worked on my WSL environment (I created a new project only with the package.json). Don't know if you are also using windows?

from nx.

flipcasa avatar flipcasa commented on September 28, 2024

Here also nestjs,

Also the same package.json worked on my WSL environment (I created a new project only with the package.json). Don't know if you are also using windows?

im using mac

from nx.

cskiwi avatar cskiwi commented on September 28, 2024

its weird it keeps failing for only nestjs projects it's working fine on node/js projects

I was testing if this was really true. So I made a package.json with no nest and still lots of other deps and the issue was still there.
Interesting that on my pc this always "crashed" on the listing of dependencies after @angular-devkit/build-angular.


"@angular-devkit/build-angular@>= 15.0.0 < 18.0.0", "@angular-devkit/build-angular@>=15.0.0 <19.0.0", "@angular-devkit/build-angular@~17.3.7":      
  version "17.3.8"
  resolved "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.3.8.tgz"
  integrity sha512-ixsdXggWaFRP7Jvxd0AMukImnePuGflT9Yy7NJ9/y0cL/k//S/3RnkQv5i411KzN+7D4RIbNkRGGTYeqH24zlg==
  dependencies:
    ora "5.4.1"
    less "4.2.0"
    open "8.4.2"
    rxjs "7.8.1"
    sass "1.71.1"
    vite "5.1.7"
    tslib "2.6.2"
    mrmime "2.0.0"
    semver "7.6.0"
    terser "5.29.1"
    undici "6.11.1"
  optionalDependencies:
    esbuild "0.20.1"
  dependencies:
============================================================
Bun v1.1.12 (43f0913c) Win

Pushing it to the output bun bun.lockb &> output.log this is already crashing on line 70. which is amazinly fast I think

Edit; looking at the output this is shoiwng 2x dependencies for that package. might be something to look in to, or this is probably just weird console output

from nx.

cskiwi avatar cskiwi commented on September 28, 2024

So,

For anyone wondering. This was fixed in version 1.1.12 of bun. I still had to use the canary version to get it working on my win 11 machine. But seems to be something on my side.

Thanks to the bun team for fixing this issue !

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Thank you @cskiwi for sending this to bun. I had a feeling it was there side but wasn't too sure. @jaysoo Believe this is the last issue of bun and its closed

from nx.

jimlloyd avatar jimlloyd commented on September 28, 2024

I am using bun 1.1.12 and seeing a similar problem. See the issue I just filed: #26565 .

@Jordan-Hall is there any workaround for this problem other than abandoning bun?

edit: 1.1.13 is out. It does not fix the problem.

from nx.

Jordan-Hall avatar Jordan-Hall commented on September 28, 2024

Not sure atm I'll check your repo put when I get a minute (end of Monday st latest)

Sorry for the issues :(

from nx.

nodegin avatar nodegin commented on September 28, 2024

Getting the same error "Failed to parse bun lockfile"

Steps to reproduce:

  1. Prepare a node project with package-lock.json
  2. Run bun i, Bun should logs migrated lockfile from package-lock.json
  3. Run nx build

from nx.

jaysoo avatar jaysoo commented on September 28, 2024

I'm going to close this issue as the original problem with bun.lockb seems to be fixed.

@nodegin It looks like the migrated lockfile that is migrated from package-lock.json is failing. Can you file a new issue to track this?

from nx.

FaisalAfroz avatar FaisalAfroz commented on September 28, 2024

I am getting this error too. The failing part from my logs

[NX Daemon Server] - 2024-08-28T03:06:31.492Z - [REQUEST]: Responding to the client. handleNxWorkspaceFiles
[NX Daemon Server] - 2024-08-28T03:06:31.492Z - Done responding to the client handleNxWorkspaceFiles
[NX Daemon Server] - 2024-08-28T03:06:31.492Z - Handled GET_FILES_IN_DIRECTORY. Handling time: 1. Response time: 0.
[NX Daemon Server] - 2024-08-28T03:06:31.756Z - Time taken for 'build-project-configs' 717.620939ms

NX Failed to parse bun lockfile

Please open an issue at https://github.com/nrwl/nx/issues/new?template=1-bug.yml and provide a reproduction.

Original error: Target project does not exist: npm:string-width@npm:string-width@^4.2.0

Error: Target project does not exist: npm:string-width@npm:string-width@^4.2.0

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.