skynetindia / vuestore-theme

Vue Storefront integration with aimeos package
MIT License
6 stars 6 forks source link

ERROR Failed to compile with 7 errors #1

Open maynor96 opened 1 year ago

maynor96 commented 1 year ago

Hello!

I am trying to implement the theme with Laravel Aimeos. I have followed the steps described in the documentation:

  1. Fork the repo.
  2. Clone your fork of the repo Example: git clone https://github.com/skynetindia/vuestore-theme.git cd vuestore-theme
  3. Run yarn install to install dependencies.
  4. Build dependencies for API-client, composables, and theme yarn build.
  5. Run yarn dev if you are using development, else run yarn start for production mode.

The dependencies are installed without any problem, however when I run the command: yarn dev these errors occur:

image

I would appreciate your help to create a vuestorefront theme for Laravel Aimeos.

Best regards!

skynetindia commented 1 year ago

@maynor96 Can you please provide more details about it if possible list of errors so we can look and resolve it

jajouka79 commented 1 year ago

did you solve this issue? it seems like the repo doesn't work

JoLeoAntares commented 1 year ago

I have done the same steps (git clone https://github.com/skynetindia/vuestore-theme.git), yarn dev works for me but after having launch my local storefront (tried to connect to graph sql API of my Aimeos by changing DOMAIN=http://127.0.0.1:8000/admin/default/graphql inside packages/theme/.env), I have a lot of errors and don't really understand what's wrong ?

Capture d’écran du 2023-07-15 17-47-22

aimeos commented 1 year ago

You need to point the storefront to /jsonapi frontend JSON:API, not the GraphQL admin API.

JoLeoAntares commented 1 year ago

Thanks @aimeos and with JSON:API, is it possible to make POST requests on every Aimeos Resources ? I wanted to make also my own backend because I have to manage a lot of new Resources inside and I don't really find how to really customize Backend.

JoLeoAntares commented 1 year ago

@aimeos do I need to replace by DOMAIN=http://127.0.0.1:8000/admin/default/jsonadm ?

JoLeoAntares commented 1 year ago

Ok it's directly DOMAIN=http://127.0.0.1:8000/jsonapi, I didn't find it inside Aimeos documentation. but I still have a lot reactive errors insode components ?

image

JoLeoAntares commented 1 year ago

@skynetindia @aimeos Sorry for my questions but when I want to use SSR mode, I have also this error :

image

Maksimius commented 1 year ago

First error: require() of ES Module /vuestore-theme/node_modules/@glidejs/glide/dist/glide.js from /vuestore-theme/node_modules/vue-server-renderer/build.dev.js not supported. glide.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead rename glide.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /vuestore-theme/node_modules/@glidejs/glide/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

Second error: [theme] ERROR [Vue warn]: Error in setup: "Error: This must be called within a setup function." [theme] [theme] found in [theme] [theme] ---> at _theme/layouts/default.vue [theme] [theme]

skynetindia commented 12 months ago

Okay we will look for this and give feedback asap