Closed Nico-L closed 8 years ago
Hello, those modules are provided by node.
https://github.com/meteor/node-stubs https://guide.meteor.com/1.3-migration.html#modules
Hi Lovell,
Thanks, indeed installing node-stubs fixed the issue.
Now I have a different problem:
Unable to resolve some modules:
"./build/Release/sharp" in /mnt/vdb/web/site-LBF/node_modules/sharp/index.js (web.browser)
I have uninstalled and re-installed sharp several times with not much success, through package.json and manually npm install sharp
. And indeed, there is no sharp directory under /build/Release/. I have looked into past issues here but nothing that helped me.
Would you have an idea?
Thanks
I have no experience of Meteor.
https://guide.meteor.com/using-npm-packages.html suggests meteor npm install
should be run.
Is there any useful error or debug information when running meteor npm install sharp
?
Thank you for having done these research. I tried npm install and meteor npm install. logSharpInstall is the verbose log of meteor npm install --verbose
.
logSharpInstall.txt
The following log corresponds to the meteor npm install sharp --verbose
command
logSharpInstallManual.txt
Oddly enough, this isn't much of a big red error.
Thanks
https://github.com/meteor/meteor/issues/6726 might be relevant but you're way beyond my knowledge of Meteor.
Let's leave this question open in case others can help.
Hey, having the same problem here — wondering if anyone's found a solution?
same here
I did not find any solution. I ended up using the cfs:imagemagicks Meteor package
I found a 'solution':
$ cd node_modules/sharp/build/Release
$ ln -s sharp.node sharp
I took Nico-L' way and switched to graphicsmagick... works fine
Thank you @isjackwild, your workaround has just provided the inspiration for a solution.
It looks like Meteor doesn't add the .node
extension in its (custom?) implementation of require()
like Node does - https://nodejs.org/api/all.html#addons_loading_addons_using_require
Changing https://github.com/lovell/sharp/blob/master/index.js#L12 to explicitly include the .node
might fix this.
- var sharp = require('./build/Release/sharp');
+ var sharp = require('./build/Release/sharp.node');
I'll need to test this to ensure everything else still works cross-platform.
Awesome news! Fingers crossed that works…
I spent hours trying to figure this one out. ;)
On 5 Oct 2016, at 10:23, Lovell Fuller notifications@github.com<mailto:notifications@github.com> wrote:
Thank you @isjackwildhttps://github.com/isjackwild, your workaround has just provided the inspiration for a solution.
It looks like Meteor doesn't add the .node extension in its (custom?) implementation of require() like Node does - https://nodejs.org/api/all.html#addons_loading_addons_using_require
Changing https://github.com/lovell/sharp/blob/master/index.js#L12 to explicitly include the .node might fix this.
I'll need to test this to ensure everything else still works cross-platform.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/lovell/sharp/issues/537#issuecomment-251625239, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFf8D75EhJRV9WCP1sbYY-2dnsjATb6zks5qw2ycgaJpZM4Jbzsc.
Commit 739178d explicitly adds the .node
extension that is lacking in Meteor's require()
implementation, intentionally or otherwise.
Everything appears to still work when require()
d by Node on Linux, OS X and Windows.
Is anyone able to test this with Meteor?
/cc @DrDanRyan
This enhancement is in v0.16.1, now available via npm.
Hi,
I would like to use sharp for image manipulation in a meteor project I am working on. I add the sharp dependency in my package.json:
"sharp": "^0.15.1"
I didn't add any dependencies
When start the app, I have this error:
Theses modules are not the dependencies listed in the npm page. I tried to add the dependencies to the package.json:
It doesn't change anything.
Am I missing any prerequisites ?
Thanks