Based on this: build-image/run-build-functions.sh at focal · netlify/build-image · GitHub , I don’t think we’re actually using the flag. I’m also getting it confirmed with the developers, but at the moment I’m not seeing us using ignore-optional
flag by default anywhere in the code-base.
Are you seeing it cause problems?
Hmm that’s weird. Yeah I think typedoc
is not installed so I strongly suspect an issue with optional dependencies.
Hey @eric-burel ,
I’ve filed an issue here:
opened 02:06PM - 01 Dec 21 UTC
closed 12:08PM - 17 Dec 21 UTC
question
theme/package-managers
theme/yarn
Hi!
There seems to be an issue with installing optional dependencies when usi… ng Yarn.
The [Netlify documentation](https://docs.netlify.com/configure-builds/manage-dependencies/#yarn) mentions that when using Yarn, `--ignore-optional` flag is passed by default.
While going through the [default build script](https://github.com/netlify/build-image/blob/focal/run-build-functions.sh#L152), this doesn't seem to be the case. I was not able to find a trace of `ignore-optional` in the repo. However, based on [this thread](https://answers.netlify.com/t/yarn-flags-env-variable-being-ignored/33637/23), it appears that optional dependencies are not installed and adding the flag `--no-ignore-optional` doesn't make any difference either.
Could this be investigated? Maybe this was the behaviour in the past, but it changed sometime?
But to help with the investigation, could you share a repo with reproduction?
Hey @eric-burel ,
We heard back from the team and found out that ignore-optional
flag is only set on Yarn version 0.18.1
. You can see more details about it in the above issue. So if you’re seeing this issue, we’d ned a reproduction to test.