node-emoji: 1.4.2 release is missing index.js

Bumped in to this just a moment ago when 1.4.2 was released, as the popular Yarn package management tool depends on this, and was not tied to a specific version.

# npm install node-emoji@1.4.1
...
└── node-emoji@1.4.1  extraneous
# ls -l node_modules/node-emoji/index.js
-rw-r--r-- 1 user user 40 Feb 28  2016 node_modules/node-emoji/index.js

# npm install node-emoji@1.4.2
...
└── node-emoji@1.4.2  extraneous
# ls -l node_modules/node-emoji/index.js
ls: cannot access 'node_modules/node-emoji/index.js': No such file or directory

Not an expert on how packages work, but I assume this is needed in order to require a package.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

Its happening for builds that install yarn fresh (new continuous integration servers). Upgrading to yarn 0.17.10 fixes it.

@omnidan Excellent! Thanks for the super-quick response and release. The updated version did fix the issue in my build and unblocked my team quickly.

After looking into the issue further, it does seem that you’re correct that this is a bug in Yarn’s require-resolving cache that didn’t respect package-dependency updates, and nothing to do with breaking semantic versioning in a strict sense. Sorry for the false alarm but I do appreciate the quick patch release nonetheless, and I’m sure you’ve helped save many others out there many hours of pain with that.

@pdhoopr yes this is definitely an issue with yarn caching, but it’s also not such an important change that it has to be released now. I’ll keep this reverted until yarn fixes the issue. 😉 Thanks for all the comments!

@wjordan @omnidan It’s worth noting that an entry point change is not viewed by everyone as an incompatible API change. The conversation around this node-uuid issue is a good example.

The relevant point here is that this package still worked the same once the entry point was changed in v1.4.2 as it did in the previous v1.4.1. So if you wanted to download it and use it directly like in the docs…

var emoji = require('node-emoji')
emoji.get('coffee')

…that code worked exactly the same before and after the entry point change, and nothing else in the public API was modified, so the minor version bump was probably fine. In the end, I guess it’s up to the discretion of the library author in cases like this.

Ultimately though, the real problem here was with Yarn caching… a major version bump just happens to be a workaround.

@omnidan this entry-point change is an incompatible API change that breaks Semantic Versioning guidelines, which npm recommends for packages published to its repository. This breaking change should trigger a MAJOR version bump, otherwise it will continue to break downstream libraries that use a major-pinned version of this library as a dependency.

As far as I’m concerned, this issue is unresolved and will continue to cause dependency issues for any version of yarn installed via npm (because it depends on a major-version-pinned "node-emoji": "^1.0.4" in its package.json) until a new PATCH or MINOR version of node-emoji (1.4.3 or 1.5.0) is published that reverts major-version 1.x of this library to its original API behavior.

To follow-up, a MAJOR version of node-emoji (2.0.0) could be published with this API-breaking change without causing further issues.

Clearing the Yarn cache does seem to be the solution here. You should be able to do so by clearing the cache manually (OS-specific folder locations can be found in Yarn issue #2119), by running yarn cache clean (if you’re able to - I couldn’t while this issue was happening), or by changing your Yarn version (I think).

@mandragorn try uninstalling and reinstalling yarn, maybe clearing the yarn cache