For jimp not to crasch when required.
Crash on require.
Stack trace:
Error: Cannot find module 'core-js/modules/es6.object.define-property'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
This is an old bug. Please update to a newer version of jimp. This bug was fied on v0.3.5
Still an issue. Please check https://github.com/darkbob/jimp-issue-754
This is probably because babel polyfill relies on a specific version of core-js.
I got hit on this on multiple projects last evening.
is there anyway that you can upgrade to core-js v2.5.7? is there a reason you need to use the older version? @darkbob @lillem4n
It's one of my dependencies that uses an old version of core-js and for some reason it installs that version in the root of my dependency tree. Why cant jimp have core-js as a dependency when it obviously depends on it?
jimp depends on '@babel/polyfill' which in turn depends on 'core-js'. Since npm an yarn both install only one version of a dependency it would not matter if we depended on it directly. The same issue would happen.
Hm, I don't know about yarn but npm will install the specific depended upon version if it is required by the package. It would save us in our projects at least if jimp had a pinned dependency for core-js v2.5.7, I think.
Also, since Jimp directly requires the specific core-js file/lib a change in babel upstream would also break jimp in the future. The logical thing, I think, is to add core-js as a direct dependency to jimp.
@lillem4n can you try out v0.3.8 for me?
Just tried on one of the projects, does not seem to work sadly. :( I'll poke around a bit and see if I can make it work. I'll return my findings! Thanks for the super-fast replies and fixes and deploys!
It seems like i need to add an explicit dep to each package in the monorepo for this to work correctly
Okay I made the changes in v0.3.9 @lillem4n let me know if it works
0.3.9 fixed the issue for me. Thx for fast response.
Works here as well! Superior win! \o/
Most helpful comment
0.3.9 fixed the issue for me. Thx for fast response.