serverless-bundle: Module parse failed: Unexpected character '�' (1:0)
While packaging code that includes sharp ^0.22.1
, I encountered this error:
ERROR in [redacted]/node_modules/sharp/build/Release/sharp.node 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
@ [redacted]/node_modules/sharp/lib/input.js 5:14-52
@ [redacted]/node_modules/sharp/lib/index.js
@ [redacted]
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 21 (9 by maintainers)
@compwright @Susan123456789 I’ve added a fix. I’ve created a beta version for you to test. Install it using:
I’m excluding the
sharp
package by default. However, I’m not sure about this option that you are using:Can you tell me what this does and if you need the plugin to have this option?