Adding it to externals, for me, required putting the following inside chainWebpack under build in quasar.conf.js
chain.externals({
'sharp': 'commonjs sharp'
})
Adding it to externals, for me, required putting the following inside chainWebpack under build in quasar.conf.js
chain.externals({
'sharp': 'commonjs sharp'
})
Adding it to externals, for me, required putting the following inside chainWebpack under build in quasar.conf.js
chain.externals({
'sharp': 'commonjs sharp'
})
Anyone else reading might be helped by the following thread;
https://github.com/lovell/sharp/issues/2646
In my case, sharp needed to be configured in webpack’s externals, but quasar’s abstraction was a bit hard to navigate since most instructions expect a webpack.config file. The above helped me a lot, even though it may seem simple.
Did you do anything else? I’m having the same issue with sharp and adding those lines simply gave me the same error with a different filename;
Error: The specified module could not be found.
node_modules\sharp\build\Release/sharp.node
Even though that file definitely exists at that location.