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

1.13.5 fails to install in a node.js docker container #2967

Closed
RomanKisilenko opened this issue Sep 23, 2022 · 14 comments
Closed

1.13.5 fails to install in a node.js docker container #2967

RomanKisilenko opened this issue Sep 23, 2022 · 14 comments

Comments

@RomanKisilenko
Copy link

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! underscore@1.13.5 postinstall: patch-package
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the underscore@1.13.5 postinstall script.

Please revert the failed release or release a bugfix.

@vincent-ogury
Copy link

same issue here:

node_modules/underscore: Command failed.
Exit code: 127
Command: patch-package
Arguments:
Directory: node_modules/underscore
Output:
/bin/sh: patch-package: command not found

@Nauzer
Copy link

Nauzer commented Sep 23, 2022

Same here on node v12.22.7

@rubenesda
Copy link

rubenesda commented Sep 23, 2022

Same issue on node v11.14.0 Could this be fixed?

@vincent-ogury
Copy link

solve for now with:

  "resolutions": {
    "underscore": "1.13.4"
  },

in the package.json.
It will force underscore to this version

@barrenechea
Copy link

@jgonggrijp a hand over here, please? It seems to be related to 08cb140

@leithouse
Copy link

The issue is in the post install script in package.json

"postinstall": "patch-package"

@nicolasKuhn-y
Copy link

nicolasKuhn-y commented Sep 23, 2022

Same Issue

@yannickcare
Copy link

yannickcare commented Sep 23, 2022

solve for now with:

  "resolutions": {
    "underscore": "1.13.4"
  },

in the package.json. It will force underscore to this version

I added this in my package.json, also the
"scripts": { "preinstall": "npx npm-force-resolutions" },

but I still getting the issue underscore@1.13.5 postinstall: patch-package

Update: # npm WARN lifecycle c4g-api@0.0.1~preinstall: cannot run in wd c4g-api@0.0.1 npx force-resolutions (wd=/app)

@yannickcare
Copy link

yannickcare commented Sep 23, 2022

Modified to include :
DockerFile
RUN npm i npm-force-resolutions
RUN npm install --production --unsafe-perm

In package.json:

"scripts": {
"preinstall": "npx force-resolutions"
},
"resolutions": {
"underscore": "1.13.4"
},

which let me run the "resolutions" but in the end I still have underscore@1.13.5 postinstall /app/node_modules/underscore

update: added "underscore": "1.13.4" to my "dependencies" as well, now it works.

@Keysox
Copy link

Keysox commented Sep 23, 2022

Another workaround is yarn install --ignore-scripts

@coughlinj
Copy link

Workaround:

npm i patch-package

Before doing anything that requires underscore as a dependency.

@SantiagoMejorada
Copy link

Workaround:

npm i patch-package

Before doing anything that requires underscore as a dependency.

This save my build! Thanks a lot!

@jgonggrijp
Copy link
Collaborator

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

@lucascmelo
Copy link

thanks @jgonggrijp it's working now.

jgonggrijp added a commit that referenced this issue Sep 23, 2022
This broke much more stuff than I expected.

Ref #2967 #2968 #2969 #2970 #2971 #2972 #2973 #2974
jgonggrijp added a commit to jgonggrijp/underscore that referenced this issue Nov 13, 2022
jgonggrijp added a commit to jgonggrijp/underscore that referenced this issue Nov 13, 2022
jgonggrijp added a commit to jgonggrijp/underscore that referenced this issue Nov 13, 2022
jgonggrijp added a commit to jgonggrijp/underscore that referenced this issue Nov 13, 2022
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