Skip to content
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

npm module error #2

Closed
bsweaty opened this issue Feb 7, 2019 · 7 comments
Closed

npm module error #2

bsweaty opened this issue Feb 7, 2019 · 7 comments
Assignees
Labels

Comments

@bsweaty
Copy link

bsweaty commented Feb 7, 2019

ran through the install steps, ran into an issue when running my test:

{ "errorMessage": "The module '/var/task/node_modules/sharp/build/Release/sharp.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 48. This version of Node.js requires\nNODE_MODULE_VERSION 57. Please try re-compiling or re-installing\nthe module (for instance, using npm rebuildornpm install).", "errorType": "Error", "stackTrace": [ "NODE_MODULE_VERSION 48. This version of Node.js requires", "NODE_MODULE_VERSION 57. Please try re-compiling or re-installing", "the module (for instance, using npm rebuildornpm install).", "Object.Module._extensions..node (module.js:681:18)", "Module.load (module.js:565:32)", "tryModuleLoad (module.js:505:12)", "Function.Module._load (module.js:497:3)", "Module.require (module.js:596:17)", "require (internal/module.js:11:18)", "Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:10:15)", "Module._compile (module.js:652:30)", "Object.Module._extensions..js (module.js:663:10)", "Module.load (module.js:565:32)" ] }

@sagidM
Copy link
Owner

sagidM commented Feb 7, 2019

Hi Brian,

Thank you for opening.
Could you tell me, please, what the assembly you are using?
Was that from https://github.com/sagidM/s3-resizer/releases
Or you download a zip file https://github.com/sagidM/s3-resizer/archive/master.zip
Giving the answer to either option will help!

@mxnr
Copy link

mxnr commented Feb 7, 2019

Hey @sagidM!
Just got the same error, i am using zip from latest 2.0.0 release

@mxnr
Copy link

mxnr commented Feb 7, 2019

Tried to download master, run npm install with node 8.10.0, push it to lambda, but now i'm getting:

module initialization error: Error
at Object.hasVendoredLibvips (/var/task/node_modules/sharp/lib/libvips.js:61:13)
at Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:9:22)
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)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/task/node_modules/sharp/lib/index.js:3:15)

@sagidM
Copy link
Owner

sagidM commented Feb 7, 2019

Oh, okay.
That's interesting.
Anyway I am going to update README with latest instructions.
So I will test everything asap.

@bsweaty
Copy link
Author

bsweaty commented Feb 7, 2019

image

this is the one. thanks @sagidM

@sagidM
Copy link
Owner

sagidM commented Feb 10, 2019

Okay guys...
Seems the release you have downloaded (2.0.0 tag) was only for NodeJS 6.10, not for 8.10.

I have changed the description of that one and added a new release 2.0.1.
Yes, now we have 2 versions!
I think in the next releases I keep only NodeJS 8, but since we have users who might use version 6, let it be for now.

FAQ how to build:
http://sharp.pixelplumbing.com/en/stable/install/#aws-lambda

@sagidM
Copy link
Owner

sagidM commented Feb 13, 2019

@bsweaty @mxnr
One more thing that has to be mentioned:
You may get the error Access Denied.
To fix that you need to Your bucket -> Public access settings -> Edit.
Then uncheck the corresponding fields:
image
(I do not use Remove so I have kept that one)
Of course I will put this in README soon.

Info https://stackoverflow.com/a/53348340

@sagidM sagidM closed this as completed Nov 20, 2019
@sagidM sagidM self-assigned this Nov 20, 2019
@sagidM sagidM added the bug label Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants