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

install --prod fails with workspaces when shared-workspace-lockfile=false and node-linker=hoisted #6584

Open
123joshuawu opened this issue May 24, 2023 · 7 comments

Comments

@123joshuawu
Copy link

pnpm version: 6.35.1 and 7.32.5

Code to reproduce the issue:

https://github.com/123joshuawu/pnpm_node_linker_hoisted_install_error

Full reproduction in the github repository, description copy pasted here.

.npmrc contains the following configuration:

shared-workspace-lockfile=false
node-linker=hoisted

pnpm-workspace.yaml setup with

packages:
  - 'apps/*'

One workspace apps/test with the following dependencies:

    "dependencies": {
      "typeorm": "^0.3.16"
    },
    "devDependencies": {
      "@types/node": "^20.2.3",
      "ts-node": "^10.9.1",
      "typescript": "^5.0.4"
    }

Command pnpm install --prod fails for latest v6 and v7.

Expected behavior:

pnpm install --prod should succeed

Actual behavior:

Install error in version 6: ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for '/ts-node/10.9.1_6e60fac3ec6053710c20ba789de9afc7' in pnpm-lock.yaml

Install error in version 7: ERR_PNPM_MISSING_HOISTED_LOCATIONS  /@jridgewell/resolve-uri/3.1.1 is not found in hoistedLocations inside node_modules/.modules.yaml

Additional information:

  • node -v prints: 14.21.3
  • Windows, macOS, or Linux?: macOS, Linux
@123joshuawu
Copy link
Author

v6 seems to be related to #4473 and v7 to #6553

@vkrol
Copy link
Contributor

vkrol commented May 25, 2023

This error is also reproduced in 8.5.1.

@itsjavi
Copy link

itsjavi commented May 29, 2023

I confirm I still find this issue in 8.6.0

{
  "private": true,
  "dependencies": {
    "@ianvs/prettier-plugin-sort-imports": "^4.0.0",
    "eslint": "^8.41.0",
    "eslint-config-next": "13.4.2",
    "eslint-config-prettier": "^8.8.0",
    "eslint-config-turbo": "^1.9.9",
    "eslint-plugin-react": "^7.32.2",
    "eslint-plugin-vitest": "^0.1.5",
    "husky": "^8.0.3",
    "next": "13.4.2",
    "prettier": "^2.8.8",
    "pretty-quick": "^3.1.3",
    "sort-package-json": "^2.4.1",
    "turbo": "^1.9.9",
    "typescript": "^5.0.4"
  },
  "devDependencies": {
    "@vitest/coverage-c8": "^0.31.1",
    "env-cmd": "^10.1.0",
    "vite": "^4.3.9",
    "vitest": "^0.31.1"
  },
  "packageManager": "pnpm@8.6.0",
  "engines": {
    "node": ">=18.5.0 <19.0.0"
  }
}

When I run pnpm install --prod=false It complains with:

 ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for '/@ianvs/prettier-plugin-sort-imports/4.0.0(prettier@2.8.8)' in pnpm-lock.yaml

Even if I recreate the lock file.

@skoch13
Copy link

skoch13 commented Oct 3, 2023

Hello,
Do you have any updates on this?

Thank you in advance.

@milon27
Copy link

milon27 commented Nov 2, 2023

facing same issue on pnpm:8.10.2

@edvinv
Copy link

edvinv commented Nov 13, 2023

Same here (pnpm version 8.10.3), not working with configuration:

shared-workspace-lockfile=false 
node-linker=hoisted

@alvis
Copy link
Contributor

alvis commented Feb 2, 2024

Same here with 8.14.0.

shared-workspace-lockfile=false 
node-linker=hoisted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants