-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Doesn't install correct dependencies for 1.3.2 #5152
Comments
I was unable to reproduce using the same dependencies:
Could you try running with |
Unfortunately, I don't have control over what flags yarn is launched with when Netlify runs the build afaik. This is the full relevant log I can produce at this stage;
I made sure to clear the build cache etc. before deploying. |
You know what's weird about that... it's running the install script for
|
Sorry, my bad! This of course is not run with the I have updated the title and description of the issue, and will ask what other (if any) flags and parameters they use over at Netlify when kicking off the build, to see if that clarifies what's happening. |
yarn install --production
doesn't install correct dependencies for 1.3.2
cc @BYK. We discussed recently a known problem with transitive optional dependencies, could be related |
I think it might be. This is the build script Netlify uses, and from what I can see it uses the |
Btw, #5059 is the PR to fix |
@adamreisnz yeah, @kjbekkelund's patch should fix this then. @kjbekkelund I'm not sure if we need another pass on that patch. I think we'll just merge it as it is and then try to address the larger problem separately. |
@BYK That works for me. Been busy on a release here, so was planning to get back to it in a couple days. |
@kjbekkelund my latest comment was about simpler tests anyways. I'll try to see if I can do it myself and then merge the patch. |
Awesome thanks guys, let me know once it's released and I'll run some tests on Netlify again. |
@adamreisnz well, if you can check in https://8470-49970642-gh.circle-artifacts.com/0/yarnpkg/yarn-1.3.2.js and then add |
I'm not sure I have that level of control over the build process at Netlify
…On Tue, Jan 16, 2018, 07:50 Burak Yiğit Kaya ***@***.***> wrote:
@adamreisnz <https://github.com/adamreisnz> well, if you can check in
https://8470-49970642-gh.circle-artifacts.com/0/yarnpkg/yarn-1.3.2.js and
then add yarn-path "path/to/checked-in/file" to your .yarnrc file, you
should be able to test the version with the patch applied.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5152 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAd8QmYmAeW1gAkXBosEnUF8WlESerSZks5tK54BgaJpZM4RSH6Z>
.
|
Is there a new version going to be released soon? I feel really sad for still having to use yarn 0.18.2 on Netlify :( |
Hey folks. I'm also having this problem, also ran into it with Netlify. @BYK I just tried your suggestion and it worked! 👏Thank you. This was the end of quite a frustrating day. |
@adamreisnz, you can use the release candidate on Netlify, which has this fix, by making a
|
Thanks I'll give it a go. Didn't think specifying the version flag would work if the version hasn't officially been released et. |
1.4.0 doesn't seem to have fixed it.
These are the dependencies I'm trying to install (all packages are up to date):
And to clarify, this works fine with 0.18.2 or when installing without the |
Aw bummer I also just heard back from one of the Netlify engineers who recommended this:
|
Hmm, so is Netlify going to change the default flag? |
FYI: Netlify is going to change the default flag - I work there, and we are working on rolling that fix out in the next couple of days. |
) **Summary** Closes #5054, closes #4876, closes #5152. Currently when running `yarn --ignore-optional` required dependencies can be marked as optional because they exist in the tree of `optionalDependencies` of one of the dependencies (but it's required by some other non-optional dependency). For example: `once` depends on `wrappy`, but `wrappy` is also in the chain from `fsevents` (`glob` -> `inflight` -> `wrappy`) which is an optional dependency of `chokidar`. So if the first `wrappy` comes from an "optional chain" when yarn processes it, it ends up being marked as `_reference.optional = true`, and the package hoister therefore doesn't mark it as required. When running the released version of yarn with https://github.com/spalger/reproduce-issues/blob/master/yarn-ignores-non-optional-dependencies you'll see ``` ~/dev/reproduce-issues/yarn-ignores-non-optional-dependencies $ yarn --ignore-optional yarn install v1.3.2-20171204.1856 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... ✨ Done in 0.17s. ~/dev/reproduce-issues/yarn-ignores-non-optional-dependencies $ yarn check --verify-tree yarn check v1.3.2-20171204.1856 error "once#wrappy" not installed error An unexpected error occurred: "Found 1 errors.". ``` This fix checks whether or not the parent is marked as required, and if so, marking the dependency as required _unless_ it's listed in the parent's `optionalDependencies`. **Test plan** I tested this implementation with both https://github.com/spalger/reproduce-issues/blob/master/yarn-ignores-non-optional-dependencies and #4876, and in both cases `yarn check --verify-tree` succeeded after running `yarn --ignore-optional`. Also added automated tests.
I'm unfortunately running into this problem still, even setting the
This build works perfectly locally, so I'm not sure what can be done if all the build flags are being set properly according to this thread. I'm even having this problem with a completely empty |
This is likely not a problem with yarn and should be brought up with the
netlify helpdesk. (says the guy who runs the netlify helpdesk)
…On Wed, Aug 8, 2018 at 9:49 AM Alan Woo ***@***.***> wrote:
I'm unfortunately running into this problem still, even setting the
YARN_FLAGS to --no-ignore-optional and various specific versions of yarn,
1.4.0, 1.3.2 etc, everything fails on netlify as it seems to be missing
the semver module:
3:11:30 PM: > node build/build.js
3:11:30 PM: module.js:549
3:11:30 PM: throw err;
3:11:30 PM: ^
3:11:30 PM: Error: Cannot find module 'semver'
This build works perfectly locally, so I'm not sure what can be done if
all the build flags are being set properly according to this thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5152 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAN-oBAlYa1fr-W1mpm-ecGhS6zbuk7Xks5uOxZ8gaJpZM4RSH6Z>
.
|
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Installation of packages fails when installing in production, Yarn 1.3.2 errors with:
Error: Cannot find module 'are-we-there-yet'
This does not happen with Yarn 0.18.1, where the installs complete successfully.
If the current behavior is a bug, please provide the steps to reproduce.
These are the relevant dependencies for a particular package that fails:
What is the expected behavior?
For the Yarn install to work.
Please mention your node.js, yarn and operating system version.
Node.JS 8.9.3, Yarn 1.3.2, the build was failing on Netlify VM's.
Ref #761
The text was updated successfully, but these errors were encountered: