-
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
Lack of globally installed node-gyp package causes yarn.lock file to not be created when yarn says it was #3728
Comments
Actually, just discovered that it seems to be specific to the |
|
Can confirm. This fixes the issue for me. The fix for this in yarn should be to add this dependency and also actually check whether the lockfile was created instead of just printing a message. |
It appears that yarn is supposed to be adding yarn/src/util/execute-lifecycle-script.js Line 245 in 23dd84b
|
@jharris4 hey, just tried to reproduce this with latest master and using node 8.1.3 and I got a |
@BYK I just checked and the issue is still there with node 8.1.3 and yarn 0.27.5. I'm using homebrew to install yarn, can you suggest some steps to test out yarn 0.28.x? (it doesn't seem to be published on npm, and the nightlies page doesn't list the tarball either) |
@jharris4 - I'm downloading the
Then follow your repro steps. May be this is related to Homebrew? |
I used Here's the output:
So looks like the bug is still not fixed in 0.28.x :-( |
I tried digging a little further into the issue. I'm a bit of a noob with await/generator syntax, but something seems to be going wrong with the It gets to this line:
In the source that line is: But in the distributed/transpiled source it is I could be mistaken, but that |
Since #2064 has been closed, this one should be fixed as well. |
@arcanis Is there a version of yarn with the fix that I can install to verify? |
@jharris4 can we close this now? |
@BYK Sorry for the delay! Unfortunately this bug is still present with yarn 1.0.1. The workaround of globally installing |
I can confirm that this is still an issue with Node v9.3.0 and Yarn 1.3.2
Installing (I think #3905 is a duplicate) |
drove me crazy... |
I haven't reviewed all related issues, but yarn also stopped writing to my package.json. Installing |
Still having problem with node-gyp during yarn install but not always, mainly happening in CI:
Basically, it feel like there is some kind of concurrency issue: node-gyp is installed because it is needed, and sometimes (not always…) it's not ready yet for installing the dependency that initially required it. |
|
Scratch that, it doesn't work. |
I am experiencing this even now, 4 years later. @victornoel, what was your approach to this problem past your last comment here? |
@nemonemi sorry, this was a long time ago and I don't use yarn much lately, but I remember this was related to installing multiple package at the same time, so I would look into concurrency related options (such as |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
6 years later, NPM removes the node-gyp binary from its bundle with v9.7.2 which is released with Node 18.18. Breaking our builds because now yarn tries to install Leaving a comment primarily for others running into this problem now. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Adding an the
uws
package to a package.json dependencies section causes yarn to report that it created the lock file successfully, but the lock file does not exist.If the current behavior is a bug, please provide the steps to reproduce.
Create an empty folder with the following
package.json
file:Then run
yarn install
. It will reportsuccess Saved lockfile.
but the yarn.lock file does not exist.Removing the dependency and running the same steps (with
rm -rf node_modules
andrm yarn.lock
first if necessary to start from a clean state) does not produce the bug:Note that running
yarn install
a second time does correctly create the lock file.This bug might have something to do with the fact that the
uws
package uses an install script withnode-gyp
: https://github.com/uNetworking/bindings/blob/master/nodejs/dist/package.jsonWhat is the expected behavior?
The
yarn.lock
file should always be created when the yarn cli reports that it was.Please mention your node.js, yarn and operating system version.
MacOS 10.12.5
Node 8.1.2
Yarn 0.24.6
The text was updated successfully, but these errors were encountered: