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

npm install fails for 3.7.4 due to missing pnpm executable #2639

Closed
fspoettel opened this issue Mar 9, 2023 · 13 comments
Closed

npm install fails for 3.7.4 due to missing pnpm executable #2639

fspoettel opened this issue Mar 9, 2023 · 13 comments

Comments

@fspoettel
Copy link

fspoettel commented Mar 9, 2023

This affects anyone that does not have pnpm installed.

npm ERR! code 126
npm ERR! path <snip>/node_modules/plyr
npm ERR! command failed
npm ERR! command sh -c pnpm build
npm ERR! Volta error: Could not find executable "pnpm"
npm ERR! 
npm ERR! Use `volta install` to add a package to your toolchain (see `volta help install` for more info).
npm ERR! Error details written to <snip>/.volta/log/volta-error-2023-03-09_16_16_50.648.log

npm ERR! A complete log of this run can be found in:
npm ERR!    <snip>/.npm/_logs/2023-03-09T15_16_50_317Z-debug-0.log

Expected behaviour

Installation should work and not rely on tools that might not be installed.

Actual behaviour

Installation fails.

Steps to reproduce

Run npm install plyr without having pnpm in $PATH.

Environment

  • Browser: -
  • Version: -
  • Operating System: Pop!_OS
  • Version: 22.04

Console errors (if any)

Link to where the bug is happening

@zsavajji
Copy link

zsavajji commented Mar 9, 2023

I think that the postinstall script command is plain wrong, it should not rebuild itself :/

@tglazier754
Copy link

tglazier754 commented Mar 9, 2023

Issue when trying to yarn add plyr-react.

[4/4] Building fresh packages...
[2/2] ⢀ plyr
error C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr: Command failed.
Exit code: 1
Command: pnpm build
Arguments:
Directory: C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr
Output:
> [email protected] build C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr
> gulp build

@hykilpikonna
Copy link

Can replicate

image

@Edropem
Copy link

Edropem commented Mar 9, 2023

same here on npm install
[Exec Stream Pumper] [INFO] npm ERR! Failed at the [email protected] postinstall script.

@sampotts
Copy link
Owner

sampotts commented Mar 9, 2023

Apologies for this. I've pushed 3.7.5, which replaces references to pnpm with npm in scripts, which should resolve this issue. Report back if not.

@sampotts sampotts closed this as completed Mar 9, 2023
@tglazier754
Copy link

@sampotts I'm still running into issues when trying to yarn add either plyr directly or plyr-react. It doesn't like build regardless of which package manager does it - does it need an npm install as well?

@sampotts
Copy link
Owner

sampotts commented Mar 9, 2023

You'd need to install dependencies before building yep. That's not changed. What error are you seeing?

@tglazier754
Copy link

You'd need to install dependencies before building yep. That's not changed. What error are you seeing?

I hope that I'm just simply missing something simple. I'm using @fspoettel 's suggestion right now to override to 3.7.3

If I install plyr-react, plyr as a dependency gives me this :

error C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr: Command failed.
Exit code: 1
Command: npm run build
Arguments:
Directory: C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr
Output:
> [email protected] build
> gulp build

If I install plyr directly, I get a lot of "gulp module not found" issues. I essentially can resolve them by adding them all individually to my main project, which isn't right :

Exit code: 1
Command: npm run build
Arguments:
Directory: C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr
Output:
> [email protected] build
> gulp build

Error: Cannot find module 'gulp-hub'
Require stack:
- C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr\gulpfile.js
- C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\gulp-cli\lib\shared\require-or-import.js
- C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js
- C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\gulp-cli\index.js
- C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\gulp\bin\gulp.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
    at Module._load (node:internal/modules/cjs/loader:833:27)
    at Module.require (node:internal/modules/cjs/loader:1051:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (C:\Users\taylo\Documents\Oracle\oracle-frontend\node_modules\plyr\gulpfile.js:6:21)
    at Module._compile (node:internal/modules/cjs/loader:1149:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1203:10)
    at Module.load (node:internal/modules/cjs/loader:1027:32)
    at Module._load (node:internal/modules/cjs/loader:868:12)
    at Module.require (node:internal/modules/cjs/loader:1051:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\taylo\\Documents\\Oracle\\oracle-frontend\\node_modules\\plyr\\gulpfile.js',
    'C:\\Users\\taylo\\Documents\\Oracle\\oracle-frontend\\node_modules\\gulp-cli\\lib\\shared\\require-or-import.js',
    'C:\\Users\\taylo\\Documents\\Oracle\\oracle-frontend\\node_modules\\gulp-cli\\lib\\versioned\\^4.0.0\\index.js',
    'C:\\Users\\taylo\\Documents\\Oracle\\oracle-frontend\\node_modules\\gulp-cli\\index.js',

@nicomelamed
Copy link

nicomelamed commented Mar 10, 2023

Hi @sampotts the issue still there:
[Exec Stream Pumper] [INFO] npm ERR! [email protected] postinstall: npm run build

[Exec Stream Pumper] [INFO] npm ERR! Failed at the [email protected] postinstall script.

@sampotts
Copy link
Owner

Ah, damn. I've completely removed the postinstall script in 3.7.6 (just published). Give that a go.

@sampotts
Copy link
Owner

Sorry about all this folks. I didn't realise it would cause such problems. Please report back with any issues and I'll continue working on resolving them.

@nicomelamed
Copy link

@sampotts now its working! You save the day haha! Thanks.

@sampotts
Copy link
Owner

Great news. Thanks for getting back to me and sorry about adding to the workload!

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

No branches or pull requests

7 participants