-
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
ENOENT trying to require uuid.js
when running yarn
#2072
Comments
@dikarel It looks like the folder structure of |
Might this be related to a recent update of https://github.com/request/request/ ? I have the same issue. I install yarn using npm on my CI server. This would probably not occur if I install yarn using yarn, which for obvious reasons is impossible. My first guess would be to update |
Also, I solved this on my CI server by running |
I was hit by this issue on CI this morning too and it seems to be solved now |
Please try installing Yarn via the Windows installer. Installing via npm often results in weird issues and we don't recommend it except in cases where there's no other choice. |
Switching from NPM-based install to apt-get and then clearing the cache before installs on CI fixed this for me. FYI |
same prob in mac. it doesn't work even with |
@gitawego - How did you install Yarn? If you used npm, please try either Homebrew (if you have Homebrew) or the installation script instead:
|
Got the same issue even with older version (v0.16.0) |
Got same issue using version 0.17.9 in macos. I solved this by removing yarn which was installed with npm before, and reinstalled it with homebrew.
|
My workaround was to downgrade to |
Good idea :) We do suggest locking down the Yarn version in both the CircleCI and TravisCI docs: https://yarnpkg.com/en/docs/install-ci#circle-tab. On a CI system that uses Debian packages, you can use |
uuid 3.0.1 that was published yesterday changed
But if you run The upgrade install [email protected] again |
Isn't changing a filename like this a breaking change? |
See, this is why Yarn uses lockfiles, and why we advise against installing Yarn itself via npm. Gotta lock down your dependency versions to avoid unexpected breakages 😉 |
I apologize for making this comment, I probably shouldn't. But venting might make me feel a little better. I hate this whole node package ecosystem. There are so many layers of tooling now with so many opportunities for things to break. It is incredibly frustrating. We are just trying to get work done but there is so much churn from tooling issues. Makes me want to quit and go into alpaca farming. |
Well in fairness yarn is still < 1.0 so I think they are working out a lot of issues right now. I tested yarn for weeks before using it on CI at work for production. But even so we hit this issue and I was able to get around it. I hear you though - the fatigue is real. Just don't expect any SLA's for < 1.0 and give the creators some credit because yarn is pretty freakin awesome. |
Yep, you're right. yarn is actually helping to solve some of the pain. |
We should publish yarn with a |
Great idea @thejameskyle! I wasn't sure whether npm respects Maybe we should have a Yarn command to convert a Yarn lockfile into an npm shrinkwrap file? |
(alternatively, could we convert the version ranges in |
Making them exact version numbers wouldn't fix the entire problem because that only locks the top-level dependencies. I assume npm-shrinkwrap.json is respected in global installs, I would be very surprised if it was not. Also, I'm not sure it's worth building a command to create a |
We keep running into binary compatibility issues (e.g., installing node-sass) because developers have different versions of node/npm/yarn/etc installed and keeping everything in sync and up to date is impossible. We build with gradle and there is a very nice plugin for running node tasks. The solution I've come up with to enforce version compatibility/consistency with the build across developer environments (linux/mac/windoze) is:
I'm sure there is an appropriate meme for this. |
Any chance the version of uuid could be pinned and the NPM package updated? Seems like a quick short-term fix that'll get plenty of folks up and running again? |
@dbashford I think @thejameskyle - Would we check in the npm shrinkwrap file, or would it be built immediately before pushing to npm (eg. around here: https://github.com/yarnpkg/yarn/blob/master/circle.yml#L56)?
Good point! |
Ah yeah, brain fart on my end, I know better. My bad. |
Urgh @Daniel15 I wish I had known before that it was not advised to install yarn via npm. We've been fighting with issues on an internal project that builds in Linux Jenkins and is developed on Macs and Linux boxes. Now that I know we can simply install through system package managers that will greatly help the bugs we've encountered! Thank you! |
I've got a pull request to update the site and clarify that installation of
Yarn via npm is not ideal, I just need to tweak it a bit:
yarnpkg/website#291
Sent from my phone.
…On Dec 1, 2016 5:19 PM, "Tim Branyen" ***@***.***> wrote:
Urgh @Daniel15 <https://github.com/Daniel15> I wish I had known before
that it was not advised to install yarn via npm. We've been fighting with
issues on an internal project that builds in Linux Jenkins and is developed
on Macs and Linux boxes. Now that I know we can simply install through
system package managers that will greatly help the bugs we've encountered!
Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2072 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHdC6u_VSKusDH3ToRLbOWYRXHPXmks5rD3I3gaJpZM4K-7hl>
.
|
I just had the same thing happen with node-emoji which updated 15 minutes ago and also had a
|
I'm starting to suspect this is an issue with Roadrunner caching old paths, perhaps the cache isn't being cleared between releases. cc @kittens @thejameskyle - Someone on Reddit pointed that shrinkwrap doesn't properly handle optional dependencies, so we probably can't use it if we have a transitive dependency on fsevents (for example): https://www.reddit.com/r/javascript/comments/5fyfqk/yarn_blog_lockfiles_should_be_committed_on_all/daodvyn/ |
This is a known issue, I added a cache breaker in #1965 which should be in latest, if it's not then it'll be in the next release. The fix here is to remove the Yarn cache, one of the following commands should work: # OSX
$ rm -rf ~/Library/Caches/Yarn
# Linux
$ rm -rf ~/.cache/yarn
# Windows
$ del %LOCALAPPDATA%/Yarn/cache |
Two things to note on this issue:
A more reliable cache-breaker fix will have to take the versions of all resolved dependencies into account, and not assume that |
Nice analysis, thanks @wjordan! Could you please create a separate issue for that, so your comment doesn't get lost? |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
On Windows 7 + Node.JS 6.9.1, running latest Yarn results in the following error message:
Trace:
If the current behavior is a bug, please provide the steps to reproduce.
On Windows 7 with NodeJS and git-bash:
cd
to an existing NodeJS projectWhat is the expected behavior?
It should not throw an error
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: