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

fix(make-dedicated-lockfile): error with workspace protocol #5062

Closed
jjangga0214 opened this issue Jul 20, 2022 · 0 comments · Fixed by #5083
Closed

fix(make-dedicated-lockfile): error with workspace protocol #5062

jjangga0214 opened this issue Jul 20, 2022 · 0 comments · Fixed by #5083
Milestone

Comments

@jjangga0214
Copy link

pnpm version: 7.5.1

Code to reproduce the issue:

$ git clone git@github.com:jjangga0214/haetae.git
$ cd haetae 
$ git reset --hard 90c6718
$ pnpm install
$ pnpm add -wD @pnpm/make-dedicated-lockfile
$ cd packages/cli
$ pnpm make-dedicated-lockfile

Expected behavior:

It creates pnpm-lock.yaml in packages/core.

Actual behavior:

An error happens.

Note that @haetae/cli(packages/cli) depends on @haetae/core(packages/core) by workspace protocol.

➜  cli git:(main) ✗ pnpm make-dedicated-lockfile              
(node:66811) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./src/" in the "exports" field module resolution of the package at /Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+exportable-manifest@3.0.7/node_modules/ramda/package.json.
Update this package.json to use a subpath pattern like "./src/*".
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:66811) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./src/" in the "exports" field module resolution of the package at /Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+lockfile-file@5.1.4_@pnpm+logger@4.0.0/node_modules/ramda/package.json.
Update this package.json to use a subpath pattern like "./src/*".
(node:66811) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./src/" in the "exports" field module resolution of the package at /Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+prune-lockfile@4.0.11/node_modules/ramda/package.json.
Update this package.json to use a subpath pattern like "./src/*".
(node:66811) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./src/" in the "exports" field module resolution of the package at /Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+make-dedicated-lockfile@0.3.14/node_modules/ramda/package.json.
Update this package.json to use a subpath pattern like "./src/*".
/Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+exportable-manifest@3.0.7/node_modules/@pnpm/exportable-manifest/lib/index.js:57
            throw new error_1.default('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` +
                  ^

PnpmError: Cannot resolve workspace protocol of dependency "@haetae/core" because this dependency is not installed. Try running "pnpm install".
    at makePublishDependency (/Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+exportable-manifest@3.0.7/node_modules/@pnpm/exportable-manifest/lib/index.js:57:19)
    at async /Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+exportable-manifest@3.0.7/node_modules/@pnpm/exportable-manifest/lib/index.js:44:9
    at async Promise.all (index 0)
    at async makePublishDependencies (/Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+exportable-manifest@3.0.7/node_modules/@pnpm/exportable-manifest/lib/index.js:41:61)
    at async makePublishManifest (/Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+exportable-manifest@3.0.7/node_modules/@pnpm/exportable-manifest/lib/index.js:26:22)
    at async default_1 (/Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+make-dedicated-lockfile@0.3.14/node_modules/@pnpm/make-dedicated-lockfile/lib/index.js:49:29)
    at async main (/Users/ocean/main/haetae/node_modules/.pnpm/@pnpm+make-dedicated-lockfile@0.3.14/node_modules/@pnpm/make-dedicated-lockfile/lib/bin.js:16:5) {
  code: 'ERR_PNPM_CANNOT_RESOLVE_WORKSPACE_PROTOCOL',
  hint: undefined,
  attempts: undefined
}

Thank you so much for pnpm.

Additional information:

  • node -v prints: v16.13.1
  • Windows, macOS, or Linux?: macOS
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.

2 participants