I integrated vue store front with magento 2, frontend works fine but product images not display in frontend. It throws error Unable to compile TypeScript:nsrc/image/action/local/index.ts(27,18): error TS2339: Property ‘query’ does not exist on type ‘Request<any, any, any, any>’. imagemagick is also installed and imgurl in local.json is also defined.
Anyone please know about this why error display.
2
Answers
It is about
this.req
which is typeofRequest
fromexpress
– it hasquery
property. Please make sure you haveyarn.lock
from the original repo and reinstall dependencies.If you are using docker, you might need to add:
- './yarn.lock/var/www/yarn.lock'
To volumes section in the
docker-compose.nodejs.yml
i have found a simple solution you can try that
copy all your magento 2 pub/media data in vue-storefront-api/var/magento-folder/pub/media
Or
create a symlink if you are working on localhost
vue-storefront-api/config/local.json
vue-storefront/config/local.json
run command in vue-storefront and vue-storefront-api