question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove dependency on core-js

See original GitHub issue

This is not something you should do for the user of your library, ever.

It’s my job to provide your lib an environment it can run in, it’s not the job of an image library to go messing with it.

Let me worry about polyfilling stuff or not polyfilling stuff. Now I have to ship core-js just to get jimp working.

Maybe have a @jimp/polyfills repo if you want to provide auto-polyfilling.

Expected Behavior

No dependency on core-js.

Current Behavior

Jimp crashes without core-js.

Failure Information (for bugs)

Error: Cannot find module 'core-js/modules/es6.object.define-property'
Aug 06 10:58:11 sales hub[11767]: Require stack:
Aug 06 10:58:11 sales hub[11767]: - /var/hub/node_modules/jimp/dist/index.js

Steps to Reproduce

Use jimp.

Context

My application uses jimp.

  • Jimp Version: 0.6.4
  • Operating System: Any
  • Node version: v12.7.0

Failure Logs

Error: Cannot find module 'core-js/modules/es6.object.define-property'
Aug 06 10:58:11 sales hub[11767]: Require stack:
Aug 06 10:58:11 sales hub[11767]: - /var/hub/node_modules/jimp/dist/index.js

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

2reactions
madconstcommented, Nov 13, 2019

As far as core-js now prints a lot of spam messages through its postinstall script being a typical donationware, it is now even more reasonable to remove dependency on it: https://github.com/zloirock/core-js/issues/548

2reactions
pi0commented, Aug 30, 2019

If you are using jimp for Node.js (not browser) you may try jimp-compact a repackaged version which is much smaller and also hasn’t a dependency on jimp.

NOTE: This is NOT an official solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uninstalling packages and dependencies - npm Docs
To remove a package from your node_modules directory, on the command line, use the uninstall command. Include the scope if the package is...
Read more >
Remove core-js from direct dependencies · 91a1fc1e84 - frontend ...
Remove core -js from direct dependencies. continuous-integration/drone/push Build is passing. Details · 1. package.json. Unescape Escape View File · 10. yarn.lock.
Read more >
[meta] Remove dependency on Underscore.js outside of ...
Problem/Motivation Underscore.js was added to core as a dependency of Backbone.js. Outside of Backbone related code, our usage has been very ...
Read more >
Remove dependency completely from Npm - Stack Overflow
Package.json is under your control and you need to edit it to fit your dependencies. So if you would like to remove dependencies...
Read more >
How to: Create and remove project dependencies - Visual ...
Learn how you can use Visual Studio to create and remove your project's dependency on code from other projects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found