Atyantik/react-pwa

App doesn't start on windows machine with error (Cannot find module '../build/Release/sharp.node)

loyboy opened this issue · 3 comments

I get this error when I try to run on 32 bit system. Windows 7. You guys should have written a documentation stating it doesn't run on 32 bit systems

ERROR in ./src/resources/img/dog-cat.jpg?sizes=1200w+1000w+800w+600w+400w&placeholder Module build failed (from ./node_modules/pwa-srcset-loader/index.js): Error: The specified module could not be found. ?\C:\Users\Manaska\Applications\Clients\PAG\PAG-WS\react-pwa\node_modules\pwa-srcset-loader\node_modules\sharp\build\Release\sharp.node at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.require (C:\Users\Manaska\Applications\Clients\PAG\PAG-WS\react-pwa\node_modules\pwa-srcset-loader\node_modules\sharp\lib/constructor.js:10:15) at Module._compile (internal/modules/cjs/loader.js:688:30) at Module._compile (C:\Users\Manaska\Applications\Clients\PAG\PAG-WS\react-pwa\node_modules\pirates\lib\index.js:83:24) at Module._extensions..js (internal/modules/cjs/loader.js:699:10)

@loyboy I have never tested it on 32Bit windows system will test it if I get a chance. Till then can definitely add to the documentation.
Apologies it didn't work for you.

This is happening on my Mac as well. There are errors when installing the sharp-node package with Yarn, then I see this error when trying to start the app:

Error: Cannot find module '../build/Release/sharp.node'

@calumjames please refer to https://github.com/lovell/sharp/blob/master/docs/install.md

If you do not want to use @pawjs/srcset for image optimizations then you can simply comment it out in src/webpack