Skip to content

fix: Does not work with pnpm + plug'n'play #297

@vezaynk

Description

@vezaynk

Syncpack version

14.0.0-alpha.19

Operating system(s)

Linux

Steps to reproduce

Clone repo: https://github.com/vezaynk/pnpm-syncpack

Run pnpm install
Run pnpm syncpack

Output:

workspaces/pnpm-syncpack/.pnp.cjs:5985
    throw firstError;
    ^

Error: Your application tried to access syncpack-linux-x64, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

Required package: syncpack-linux-x64 (via "syncpack-linux-x64/bin/syncpack")
Required by: /workspaces/pnpm-syncpack/node_modules/.pnpm/syncpack@14.0.0-alpha.19/node_modules/syncpack/

Require stack:
- /workspaces/pnpm-syncpack/node_modules/.pnpm/syncpack@14.0.0-alpha.19/node_modules/syncpack/index.cjs
    at require$$0.Module._resolveFilename (/workspaces/pnpm-syncpack/.pnp.cjs:5984:13)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.<anonymous> (/workspaces/pnpm-syncpack/node_modules/.pnpm/syncpack@14.0.0-alpha.19/node_modules/syncpack/index.cjs:10:30)
    at Module._compile (node:internal/modules/cjs/loader:1730:14)
    at Object..js (node:internal/modules/cjs/loader:1895:10)
    at Module.load (node:internal/modules/cjs/loader:1465:32)
    at Function.<anonymous> (node:internal/modules/cjs/loader:1282:12)
    at require$$0.Module._load (/workspaces/pnpm-syncpack/.pnp.cjs:5875:31)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)

Expected behavior

Does not fail to resolve optionalDependency

Actual behavior

Fails to resolve optionalDependency

Contents of syncpack configuration file

packages:
  - packages/*

nodeLinker: pnp

Optional comments

I've had the same problem with nodeLinker: isolated, but haven't managed to reproduce it.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions