vuestorefront/storefront-api

SyntaxError: Unexpected identifier

undefinederror opened this issue · 4 comments

Current behavior

image

Expected behavior

should work. this is a fresh clone from github

Steps to reproduce the issue

Fresh clone.
set

app:
  environment:
    VS_ENV: prod

in docker-compose
run
docker-compose up

Can you handle fixing this bug by yourself?

  • YES
  • NO

Environment details

  • OS: Ubuntu 18.04
  • Node: 13.12.0
  • Code Version: 1.11.0-dev

Master is could be broken currently as there is no direct release we are still in development for version 1.0.0.

When I do your step I get a running instance from master.

When it didn't work for me we would not fix it as it is not the code we want to release as version 1.0.0 is completely different from master.

Master is on some commit from https://github.com/DivanteLtd/vue-storefront-api as this project start from the code base of https://github.com/DivanteLtd/vue-storefront-api.

I hope that brings some info to you.

wow.

Ok so first no I do not believe that you run my step and it worked for you.

When code is compiled for production it looks like this
image
redis and elastic are required from src (why?), which guess what, is not compiled.
So how are you running es6 imports in a .js (no .mjs) file and a package.json without type:module?

But most importantly, you are saying that storefront-api is far from production ready
This is not cool because people might trying to use for important projects, being under the impression that the project was solid, maybe because of statements like this
image

If I was maintaining this I would be careful with these false claims, and clearly state to steer away from this project for production, and stick with vue-storefront-api until v 1.0.0 is out and tested.

What i have done was:

  1. git clone git@github.com:DivanteLtd/storefront-api.git
  2. Change the the docker-compose file like you did
  3. run docker-compose up

I had a running instance.

Maybe you did some steps which you did not write in here?

For the part that it is not production ready, I did came after the repo was made public, but we could say that it is in active development at the start of the Readme.

Yes those are exactly the steps. I haven't done anything extra.
I don't know. I am not there with you so I have to take your word for it. To me it sounds like magic. There are 'src' everywhere in import and require paths. So almost nothing runs from dist.
How on Earth it works for you I have no idea.

Maybe you are using a cached image for sfa_app?
Would you be so kind to try a docker-compose up --build?

As per the last point, yes I think that making very clear in the readme that the project -right now- should not be used in production I think it would be just fair.