jashkenas / underscore

JavaScript's utility _ belt
https://underscorejs.org
MIT License
27.29k stars 5.53k forks source link

Underscore v1.13.5 install error #2970

Closed ODGodinho closed 1 year ago

ODGodinho commented 1 year ago

I'm getting the following error with the new version v1.13.5

yarn install

Exit code: 127 Command: patch-package Arguments: Directory: /home/dev123/Documentos/projetos/MyProject/node_modules/underscore Output: /bin/sh: 1: patch-package: not found at ProcessTermError.ExtendableBuiltin (/home/dev123/.nvm/versions/node/v16.17.0/lib/node_modules/yarn/lib/cli.js:721:66) at ProcessTermError.MessageError (/home/dev123/.nvm/versions/node/v16.17.0/lib/node_modules/yarn/lib/cli.js:750:123) at new ProcessTermError (/home/dev123/.nvm/versions/node/v16.17.0/lib/node_modules/yarn/lib/cli.js:790:113) at ChildProcess. (/home/dev123/.nvm/versions/node/v16.17.0/lib/node_modules/yarn/lib/cli.js:25787:17) at ChildProcess.emit (node:events:513:28) at maybeClose (node:internal/child_process:1093:16) at Socket. (node:internal/child_process:451:11) at Socket.emit (node:events:513:28) at Pipe. (node:net:757:14) error /home/dev123/Documentos/projetos/MyProject/node_modules/underscore: Command failed. Exit code: 127 Command: patch-package Arguments:

iglosiggio commented 1 year ago

You can add patch-package as a devDependency in your project (as a hacky workaround, i don't really like the idea of a dependency patching other dependencies). EDIT: no, i'm wrong This was triggered by https://github.com/jashkenas/underscore/commit/08cb1404eb27b80bcadb87a32fcd515f23f7c9a6

mykola-mokhnach commented 1 year ago

I can confirm, we started observing the same error after the recent release: https://github.com/appium/appium-uiautomator2-driver/actions/runs/3115559702/jobs/5052578876

boneskull commented 1 year ago

I think that should be prepare, not postinstall.

boneskull commented 1 year ago

cc @jgonggrijp

ODGodinho commented 1 year ago

You can add patch-package as a devDependency in your project (as a hacky workaround, i don't really like the idea of a dependency patching other dependencies). This was triggered by 08cb140

The command did not solve yarn add patch-package nor putting it directly in package.json and running yarn

joeycozza commented 1 year ago

Duplicate of https://github.com/jashkenas/underscore/issues/2967

iglosiggio commented 1 year ago

You can add patch-package as a devDependency in your project (as a hacky workaround, i don't really like the idea of a dependency patching other dependencies). This was triggered by 08cb140

The command did not solve yarn add patch-package nor putting it directly in package.json and running yarn

Sorry, that advice was mistaken. Installing patch-package globally works. I would advice against doing it... but works.

ODGodinho commented 1 year ago

problem solved by putting resolutions in my package.json

 {
  "name": ".....",
  "resolutions": {
    "underscore": "1.13.4"
  }
}
jgonggrijp commented 1 year ago

I just released 1.13.6, hopefully that fixes it. Please close if that is the case.