Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build seems broken #249

Open
kmyn opened this issue Nov 13, 2021 · 6 comments
Open

Docker build seems broken #249

kmyn opened this issue Nov 13, 2021 · 6 comments

Comments

@kmyn
Copy link

kmyn commented Nov 13, 2021

Starting the application using docker-compose up --build fails to start the application.

Creating expresscart         ... done
Attaching to expresscart-mongodb, expresscart
expresscart    | 
expresscart    | > express-cart@1.1.19 start /var/expressCart
expresscart    | > node app.js
expresscart    | 
expresscart    | /var/expressCart/node_modules/got/dist/source/create.js:157
expresscart    |     const paginateEach = (async function* (url, options) {
expresscart    |                                         ^
expresscart    | 
expresscart    | SyntaxError: Unexpected token *
expresscart    |     at createScript (vm.js:80:10)
expresscart    |     at Object.runInThisContext (vm.js:139:10)
expresscart    |     at Module._compile (module.js:617:28)
expresscart    |     at Object.Module._extensions..js (module.js:664:10)
expresscart    |     at Module.load (module.js:566:32)
expresscart    |     at tryModuleLoad (module.js:506:12)
expresscart    |     at Function.Module._load (module.js:498:3)
expresscart    |     at Module.require (module.js:597:17)
expresscart    |     at require (internal/module.js:11:18)
expresscart    |     at Object.<anonymous> (/var/expressCart/node_modules/got/dist/source/index.js:14:18)
expresscart    | npm ERR! code ELIFECYCLE
expresscart    | npm ERR! errno 1
expresscart    | npm ERR! express-cart@1.1.19 start: `node app.js`
expresscart    | npm ERR! Exit status 1
expresscart    | npm ERR! 
expresscart    | npm ERR! Failed at the express-cart@1.1.19 start script.
expresscart    | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
expresscart    | 
expresscart    | npm ERR! A complete log of this run can be found in:
expresscart    | npm ERR!     /root/.npm/_logs/2021-11-13T01_55_57_637Z-debug.log
expresscart exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
@mrvautin
Copy link
Owner

I'm not a huge Docker user. Any ideas what's wrong and how to fix?

@kmyn
Copy link
Author

kmyn commented Nov 13, 2021

I'm not a huge Docker user. Any ideas what's wrong and how to fix?

I tried changing the node version but no luck. Suspect some issue with got - sindresorhus/got#1084

@meiremans
Copy link
Contributor

meiremans commented Nov 30, 2021

the current version of node in this dockerfile is a deprecated LTS.

You can change the dockerfile with mine. this one works for me.
https://github.com/meiremans/expressCart/blob/master/Dockerfile

//edit:

You said you changed the node version.
Keep in mind in this docker-compose file there is image: "node:8" which does nothing (except naming the image node:8) because there also is a build instruction which will build the Dockerfile.

so if you changed the version in the compose file, try again with my Dockerfile.

@PraveeenPandey
Copy link

@meiremans I used your github repo of expressCart but after building when i go to localhost:1111
it doesn't have any product listed......
can you tell me the reason for this, Kindly

Thanks

@meiremans
Copy link
Contributor

@PraveeenPandey You have to add the products yourself in the admin interface

@PraveeenPandey
Copy link

Thanks @meiremans,
Glad you replied, i actually tried logging and tried using admin interface.
but u cannot access the cuz lack of credentials.
i tried some which are :
Demo credentials

Admin User:

  • User: demo@test.com
  • Password: test

Customer:

  • User: test@test.com
  • Password: test

Discount code:

  • 10 amount: DEMO_AMT10
  • 10 percent: DEMO_PCT10

but they result in saying no account under this email.

Thanks Again
Appreciate the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants