binshops / prestashop-rest

PrestaShop REST API module to expose your PrestaShop website's REST endpoints
https://www.binshops.com/prestashop-api
Academic Free License v3.0
95 stars 33 forks source link

ERROR [VSF][error] Request failed with status code 404 #31

Closed realrecordzLab closed 2 years ago

realrecordzLab commented 2 years ago

I'm getting started with prestashop and vue-storefront. I've integrated it following the developers guide provided, anyway when I try to run the app after the yarn build && yarn dev, I will see this errors in my macOS terminal

[dev:theme]  ERROR  [VSF][error]:  bootstrap/boot Request failed with status code 404
[dev:theme] 
[dev:theme]   at createError (/Users/dev/Sites/lampadina-store/prestashop/node_modules/axios/lib/core/createError.js:16:15)
[dev:theme]   at settle (/Users/dev/Sites/lampadina-store/prestashop/node_modules/axios/lib/core/settle.js:17:12)
[dev:theme]   at IncomingMessage.handleStreamEnd (/Users/dev/Sites/lampadina-store/prestashop/node_modules/axios/lib/adapters/http.js:293:11)
[dev:theme]   at IncomingMessage.emit (node:events:539:35)
[dev:theme]   at endReadableNT (node:internal/streams/readable:1345:12)
[dev:theme]   at processTicksAndRejections (node:internal/process/task_queues:83:21)
[dev:theme] 
[dev:theme] 
[dev:theme]  ERROR  [VSF][error]:  useProduct/relatedProducts/search Request failed with status code 404
[dev:theme] 
[dev:theme]   at createError (/Users/dev/Sites/lampadina-store/prestashop/node_modules/axios/lib/core/createError.js:16:15)
[dev:theme]   at settle (/Users/dev/Sites/lampadina-store/prestashop/node_modules/axios/lib/core/settle.js:17:12)
[dev:theme]   at IncomingMessage.handleStreamEnd (/Users/dev/Sites/lampadina-store/prestashop/node_modules/axios/lib/adapters/http.js:293:11)
[dev:theme]   at IncomingMessage.emit (node:events:539:35)
[dev:theme]   at endReadableNT (node:internal/streams/readable:1345:12)
[dev:theme]   at processTicksAndRejections (node:internal/process/task_queues:83:21)
[dev:theme] 
[dev:theme] 
[dev:theme]  WARN  [vue-i18n] Value of key 'See all' is not a string or function !
[dev:theme] 
[dev:theme] 
[dev:theme]  WARN  [vue-i18n] Cannot translate the value of keypath 'See all'. Use the value of keypath as default.
[dev:theme] 

At the moment I'm running my prestashop installation into a dedicated folder in the Sites directory, I'm using the integrated apache server of macOS BigSur and php 7.4

I've also enabled the webservice into the prestashop backend and I've checked if the required native modules are enabled and seems to be all ok.

Any suggestion on how to fix this problem?

samberrry commented 2 years ago

1- check your endpoints are accessible 2- in middleware.config.js file be careful that you entered the url correctly. Incorrect: http://localhost/prestashop/ correct: http://localhost/prestashop (without trailing slash)