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

Would it be possible to add legacy-peer-deps? #368

Open
lcanavesio opened this issue Nov 4, 2022 · 2 comments
Open

Would it be possible to add legacy-peer-deps? #368

lcanavesio opened this issue Nov 4, 2022 · 2 comments

Comments

@lcanavesio
Copy link

Hi Software Collections.
I need install with legacy-peer-deps.
Would it be possible to add in assemble this lines of code ?

if [ "$NODE_ENV" != "production" ]; then

echo "---> Building your Node application from source"
if [ "$NPM_MODE" == "legacy-peer-deps" ]; then
echo "---> Installing all dependencies (including peer dependencies) with legacy-peer-deps"
	npm install --legacy-peer-deps
else
echo "---> Installing all dependencies"
	npm install
fi
@pacostas
Copy link
Contributor

@lcanavesio As a temporary solution, you can pass an env variable to the npm. So you can do something like s2i -e npm_config_legacy_peer_deps=true build . my-build-image my-node-app
More info about npm : https://docs.npmjs.com/cli/v9/using-npm/config

@kunyan
Copy link

kunyan commented Nov 23, 2022

The best solution is create a .npmrc file in your project root directory with following content

legacy-peer-deps=true

It will only apply to your current project without impact any others

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

3 participants