Skip to content

Install script failing with yarn workspaces #1434

@MixMasterMitch

Description

@MixMasterMitch

I am getting the following error in my yarn workspace when I disable all hoisting (e.g. nohoist: ['**/**'])

error /Users/username/Github/repo/packages/A/node_modules/esbuild, /Users/username/Github/repo/packages/B/node_modules/esbuild, /Users/username/Github/repo/packages/C/node_modules/A/node_modules/esbuild: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/username/Github/repo/packages/A/node_modules/esbuild
Output:
/Users/username/Github/repo/packages/A/node_modules/esbuild/install.js:198
      throw e;
      ^

Error: ENOENT: no such file or directory, rename '/Users/username/Github/repo/packages/A/node_modules/esbuild/bin/esbuild__' -> '/Users/username/Github/repo/packages/A/node_modules/esbuild/bin/esbuild'
    at Object.renameSync (fs.js:772:3)
    at /Users/username/Github/repo/packages/A/node_modules/esbuild/install.js:197:78
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  errno: -2,
  syscall: 'rename',
  code: 'ENOENT',

As a workaround, I have refined my hoisting so that esbuild is hoisted, but it still seems like esbuild install script should function in either case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions