saleor / saleor-platform

All Saleor services started from a single repository with docker-compose.
BSD 3-Clause "New" or "Revised" License
650 stars 889 forks source link

Issue installing on Mac OS #80

Closed andrste closed 2 years ago

andrste commented 3 years ago

Great platform, but I can't get it run... the main issue that it can't find cross-env & webpack-dev-server... how to solve this?

OS version:

macOS X Catalina 10.15.7

Docker version

Client: Docker Engine - Community
 Cloud integration: 1.0.2
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 16:58:31 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Docker compose version

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020

Log fragment

storefront_1  | 
storefront_1  | > saleor-site@2.11.0 start /app
storefront_1  | > cross-env NODE_ENV=develop webpack-dev-server --history-api-fallback --watch --port 3000 --mode development --hotOnly "--host" "0.0.0.0"
storefront_1  | 
storefront_1  | sh: 1: cross-env: not found
storefront_1  | npm ERR! code ELIFECYCLE
storefront_1  | npm ERR! syscall spawn
storefront_1  | npm ERR! file sh
storefront_1  | npm ERR! errno ENOENT
storefront_1  | npm ERR! saleor-site@2.11.0 start: `cross-env NODE_ENV=develop webpack-dev-server --history-api-fallback --watch --port 3000 --mode development --hotOnly "--host" "0.0.0.0"`
storefront_1  | npm ERR! spawn ENOENT
storefront_1  | npm ERR! 
storefront_1  | npm ERR! Failed at the saleor-site@2.11.0 start script.
storefront_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
storefront_1  | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
storefront_1  | 
storefront_1  | npm ERR! A complete log of this run can be found in:
storefront_1  | npm ERR!     /root/.npm/_logs/2020-11-26T00_47_37_777Z-debug.log
saleor-platform_storefront_1 exited with code 1
mailhog_1     | [APIv1] KEEPALIVE /api/v1/events
dashboard_1   | 
dashboard_1   | > saleor-dashboard@2.11.0 start /app
dashboard_1   | > webpack-dev-server -d "--host" "0.0.0.0"
dashboard_1   | 
dashboard_1   | sh: 1: webpack-dev-server: not found
dashboard_1   | npm ERR! code ELIFECYCLE
dashboard_1   | npm ERR! syscall spawn
dashboard_1   | npm ERR! file sh
dashboard_1   | npm ERR! errno ENOENT
dashboard_1   | npm ERR! saleor-dashboard@2.11.0 start: `webpack-dev-server -d "--host" "0.0.0.0"`
dashboard_1   | npm ERR! spawn ENOENT
dashboard_1   | npm ERR! 
dashboard_1   | npm ERR! Failed at the saleor-dashboard@2.11.0 start script.
dashboard_1   | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
dashboard_1   | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
dashboard_1   | 
dashboard_1   | npm ERR! A complete log of this run can be found in:
dashboard_1   | npm ERR!     /root/.npm/_logs/2020-11-26T00_47_51_967Z-debug.log
saleor-platform_dashboard_1 exited with code 1
delocos commented 3 years ago

hey, did you figure out how to solve this?

andrste commented 3 years ago

Nope I think this git is dead... no support at all...

karolkielecki commented 3 years ago

@andrste @delocos Hi there. Please run npm install first. You can find more info here: https://stackoverflow.com/questions/50355263/local-package-json-exists-but-node-modules-missing

onecrayon commented 3 years ago

Kind of sad that this repo appears to be ignored, and using npm install absolutely does not fix the problem. I tried running both of these commands, and dashboard and storefront are still completely dead for me:

$ docker-compose run --rm dashboard npm install
$ docker-compose run --rm storefront npm install

This is a pretty serious roadblock for adopting Saleor for us, since we need to be able to run it locally if we're going to be able to develop against it, and this feels like something that should be relatively simple to fix for those familiar with the stack.

Has anyone found a workaround for this problem that actually works?

onecrayon commented 3 years ago

After banging our heads against this issue for a while, we finally found a fix: increase Docker available memory to 6 GB. The install stuff appears to be a red herring; the build process is simply running out of memory and dying instead.

hcooch2ch3 commented 3 years ago

@onecrayon I resolve this issue by increasing Docker's available memory. Thanks!!