vuestorefront-community / prestashop

Convert your traditional PrestaShop website into a fast, mobile friendly and modern website.
MIT License
51 stars 31 forks source link

[Bug]: ERROR Cannot read properties of undefined (reading 'status') #38

Closed cbatista8a closed 1 year ago

cbatista8a commented 2 years ago

Expected Behavior

clone git repo run yarn build run yarn dev

view site on browser

Actual Behavior

clone git repo run yarn build run yarn dev

√ Server: Compiled successfully in 30.42s [dev:theme] √ Client: Compiled successfully in 33.04s [dev:theme] i Waiting for file changes [dev:theme] i Memory usage: 438 MB (RSS: 998 MB) [dev:theme] i Listening on: http://192.168.68.56:3000/ [dev:theme] No issues found. [dev:theme] Mocked: useStore.load [dev:theme] Mocked: useWishlist.load [dev:theme] [dev:theme] ERROR Cannot read properties of undefined (reading 'status')

at getAxiosStatusCode (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:167:31) [dev:theme] at getAgnosticStatusCode (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:179:12) [dev:theme] at C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:216:32 [dev:theme] at step (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:75:23) [dev:theme] at Object.throw (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:56:53) [dev:theme] at rejected (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:47:65) [dev:theme] at processTicksAndRejections (node:internal/process/task_queues:96:5)

Possible Solution

No response

Steps to reproduce

No response

What version of PrestaShop integration are you using?

1.7.8.3

What version of Node.js are you using?

v16.14.2

What browser (and version) are you using?

Chrome

What operating system (and version) are you using?

Windows 11

Relevant log output

$ yarn dev
yarn run v1.22.19
$ concurrently "yarn:dev:*"
$ cd packages/api-client && yarn dev
$ cd packages/theme && yarn dev
$ cd packages/composables && yarn dev
warning package.json: No license field
warning package.json: No license field
$ rollup -c -w
$ rollup -c -w
$ nuxt
[dev:composables] (node:22360) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\Users\user\Downloads\vue\node_modules\rollup-plugin-typescript2\node_modules\tslib\package.json.
[dev:composables] Update this package.json to use a subpath pattern like "./*".
[dev:composables] (Use `node --trace-deprecation ...` to show where the warning was created)
[dev:api-client] (node:2556) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\Users\user\Downloads\vue\node_modules\rollup-plugin-typescript2\node_modules\tslib\package.json.
[dev:api-client] Update this package.json to use a subpath pattern like "./*".
[dev:api-client] (Use `node --trace-deprecation ...` to show where the warning was created)
[dev:composables] rollup v2.57.0
[dev:composables] bundles src/index.ts → lib\index.cjs.js, lib\index.es.js...
[dev:api-client] rollup v2.57.0
[dev:api-client] bundles src/index.ts → lib\index.cjs.js, lib\index.es.js...
[dev:theme] 
[dev:theme]  WARN  router.scrollBehavior property is deprecated in favor of using ~/app/router.scrollBehavior.js file, learn more: https://nuxtjs.org/api/configuration-router#scrollbehavior
[dev:theme]
[dev:theme] i VSF Starting Vue Storefront Nuxt Module
[dev:theme] √ VSF Installed Vue Storefront Context plugin
[dev:theme] √ VSF Installed Vue Storefront SSR plugin
[dev:theme] √ VSF Installed VSF Logger plugin
[dev:theme] √ VSF Installed Vue Storefront E2E testing plugin
[dev:theme] √ VSF Installed Internationalization Cookies plugin
[dev:theme] √ VSF Installed StorefrontUI Module
[dev:theme] √ VSF Installed Performance Module
[dev:theme] i VSF Using raw source/ESM for @vue-storefront/prestashop
[dev:theme] i VSF Using raw source/ESM for @vue-storefront/core
[dev:theme] i VSF Using raw source/ESM for @storefront-ui/vue
[dev:theme] i VSF Using raw source/ESM for @storefront-ui/shared
[dev:theme] i VSF Starting Theme Module
[dev:theme] i VSF Watching changes in @vue-storefront/nuxt-theme-module and used platform theme directory
[dev:theme] i VSF Adding theme files...
[dev:theme] √ VSF Added 58 theme file(s) to _theme folder
[dev:theme] i Middleware starting....
[dev:theme] i Loading integrations...
[dev:theme] i - Loading: prestashop @vue-storefront/prestashop-api/server
[dev:theme] √ - Integration: prestashop loaded!
[dev:theme] √ Integrations loaded!
[dev:theme] √ Middleware created!
[dev:theme] 
[dev:theme]  ERROR  (node:19152) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\user\Downloads\vue\node_modules\@vue-storefront\nuxt-theme\package.json' of 'lib/module.js'. Please either fix that or report it to the module author
[dev:theme] (Use `node --trace-deprecation ...` to show where the warning was created)
[dev:theme]
[dev:theme] i Listening on: http://192.168.68.56:3000/
[dev:theme] i Preparing project for development
[dev:theme] i Initial build may take a while
[dev:theme] √ Builder initialized
[dev:theme] √ Nuxt files generated
[dev:api-client] (!) Generated empty chunks
[dev:api-client] index, index
[dev:api-client] created lib\index.cjs.js, lib\index.es.js in 4.7s
[dev:api-client] bundles src/index.server.ts → server\index.js...
[dev:composables] created lib\index.cjs.js, lib\index.es.js in 5.3s
[dev:theme] 
[dev:theme]  WARN  Browserslist: caniuse-lite is outdated. Please run:
[dev:theme]   npx browserslist@latest --update-db
[dev:theme]   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[dev:theme]
[dev:theme] i Compiling Client
[dev:theme] i Compiling Server
[dev:api-client] created server\index.js in 2.7s
[dev:theme] √ Server: Compiled successfully in 30.42s
[dev:theme] √ Client: Compiled successfully in 33.04s
[dev:theme] i Waiting for file changes
[dev:theme] i Memory usage: 438 MB (RSS: 998 MB)
[dev:theme] i Listening on: http://192.168.68.56:3000/
[dev:theme] No issues found.
[dev:theme] Mocked: useStore.load
[dev:theme] Mocked: useWishlist.load
[dev:theme] 
[dev:theme]  ERROR  Cannot read properties of undefined (reading 'status')
[dev:theme]
[dev:theme]   at getAxiosStatusCode (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:167:31)
[dev:theme]   at getAgnosticStatusCode (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:179:12)
[dev:theme]   at C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:216:32
[dev:theme]   at step (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:75:23)
[dev:theme]   at Object.throw (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:56:53)
[dev:theme]   at rejected (C:\Users\user\Downloads\vue\node_modules\@vue-storefront\middleware\lib\index.cjs.js:47:65)
[dev:theme]   at processTicksAndRejections (node:internal/process/task_queues:96:5)
[dev:theme]

Code of Conduct

samberrry commented 2 years ago

@cbatista8a Hello, thanks for reporting. Have you changed the shop endpoint? or you are getting the error on rest.binshops.com?

samberrry commented 1 year ago

I close this issue due to inactivity. Feel free to re-open if you found it useful. thanks