question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest release breaks `pnpm install`

See original GitHub issue

https://github.com/cheeriojs/cheerio/blob/main/package.json#L30

The unpublished dependency, cheerio-select from GitHub will attempt to run the prepare script on pnpm install.

npm install works, though I would expect it to fail as well (https://docs.npmjs.com/cli/v6/using-npm/scripts#life-cycle-scripts).

To reproduce:

Create a package.json with enzyme as a dep (or any package that requires cheerio).

{
  "name": "foo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "enzyme": "^3.11.0"
  }
}

Run:

$ pnpm install

Results:

../node_modules/cheerio-select prepare$ npm run build
│ > cheerio-select@0.0.0 build
│ > tsc
│ src/helpers.ts(12,5): error TS4060: Return type of exported function has or is using private name 'plain'.
│ src/helpers.ts(12,10): error TS1005: ',' expected.
│ src/helpers.ts(12,26): error TS4060: Return type of exported function has or is using private name 'filtered'.
│ src/helpers.ts(12,34): error TS1005: ',' expected.
│ npm ERR! code 1
│ npm ERR! path /Users/mshick/Code/mshick/foo/node_modules/.pnpm/github.com/cheeriojs/cheerio-select@b98d6200519fe229904f2ae39ea44ed8e6d19182/node_modules/cheerio-select
│ npm ERR! command failed
│ npm ERR! command sh -c tsc
│ npm ERR! A complete log of this run can be found in:
│ npm ERR!     /Users/mshick/.npm/_logs/2020-12-21T20_04_30_488Z-debug.log
└─ Failed in 2s
 ERROR  Command failed with exit code 1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
fb55commented, Dec 21, 2020

I’ve published 1.0.0-rc.5 that fixes this issue. Sorry for the trouble everyone, hope all is good now!

3reactions
ljharbcommented, Dec 21, 2020

This is also causing an issue for an enzyme user: https://github.com/enzymejs/enzyme/issues/2487 not sure if they’re using pnpm, but git deps are generally a very bad idea for many reasons.

Could you publish a fork of cheerio-select, under a scope, in the meantime?

Read more comments on GitHub >

github_iconTop Results From Across the Web

pnpm install
pnpm install is used to install all dependencies for a project. In a CI environment, installation fails if a lockfile is present but...
Read more >
Migrating from pnpm 6 to 7 - Raul Melo
Pnpm 7 was released, and as with any project that follows semver, some features and breaking changes were expected.
Read more >
ERR_PNPM_ERR_PNPM_UNE...
upgrade pnpm to the latest version; remove the store (to get the store location, run pnpm store path ); run pnpm install. If...
Read more >
npm-check-updates
Latest version : 16.6.2, last published: 4 days ago. ... Identifying broken dependencies npm install npm install --no-save react@16.0.0 npm ...
Read more >
pnpm version 2 is out!. Last week v2.0 of ...
Last week v2.0 of pnpm was released. It's been almost a year since version 1.0 came out and we were busy implementing new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found