Monadical-SAS / oddslingers.poker

The Django + React codebase powering the free, open-source poker platform: OddSlingers.com
https://oddslingers.com
GNU Lesser General Public License v2.1
59 stars 18 forks source link

Having an error running the application locally with docker compose. #4

Closed Psami-wondah closed 1 year ago

Psami-wondah commented 1 year ago
[+] Building 50.5s (8/8) FINISHED                                                                                                                                        
 => [internal] load build definition from Dockerfile.webpack                                                                                                        0.0s
 => => transferring dockerfile: 45B                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                   0.0s
 => => transferring context: 34B                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:8-alpine                                                                                                    2.7s
 => [internal] load build context                                                                                                                                   0.0s
 => => transferring context: 2.91kB                                                                                                                                 0.0s
 => [1/4] FROM docker.io/library/node:8-alpine@sha256:38f7bf07ffd72ac612ec8c829cb20ad416518dbb679768d7733c93175453f4d4                                              0.0s
 => CACHED [2/4] WORKDIR /opt/oddslingers.poker/core/js                                                                                                             0.0s
 => CACHED [3/4] COPY ./core/js/yarn.lock ./core/js/package.json /opt/oddslingers.poker/core/js/                                                                    0.0s
 => ERROR [4/4] RUN yarn install                                                                                                                                   47.6s
------                                                                                                                                                                   
 > [4/4] RUN yarn install:                                                                                                                                               
#8 0.592 yarn install v1.21.1                                                                                                                                            
#8 0.663 [1/4] Resolving packages...                                                                                                                                     
#8 0.920 [2/4] Fetching packages...                                                                                                                                      
#8 36.43 warning sha.js@2.4.11: Invalid bin entry for "sha.js" (in "sha.js").                                                                                            
#8 38.89 info fsevents@1.2.13: The platform "linux" is incompatible with this module.
#8 38.89 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
#8 38.89 info fsevents@2.1.3: The platform "linux" is incompatible with this module.
#8 38.89 info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
#8 38.90 [3/4] Linking dependencies...
#8 43.89 [4/4] Building fresh packages...
#8 46.79 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#8 46.79 error /opt/oddslingers.poker/core/js/node_modules/node-sass: Command failed.
#8 46.79 Exit code: 1
#8 46.79 Command: node scripts/build.js
#8 46.79 Arguments: 
#8 46.79 Directory: /opt/oddslingers.poker/core/js/node_modules/node-sass
#8 46.79 Output:
#8 46.79 Building: /usr/local/bin/node /opt/oddslingers.poker/core/js/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
#8 46.79 gyp info it worked if it ends with ok
#8 46.79 gyp verb cli [ '/usr/local/bin/node',
#8 46.79 gyp verb cli   '/opt/oddslingers.poker/core/js/node_modules/node-gyp/bin/node-gyp.js',
#8 46.79 gyp verb cli   'rebuild',
#8 46.79 gyp verb cli   '--verbose',
#8 46.79 gyp verb cli   '--libsass_ext=',
#8 46.79 gyp verb cli   '--libsass_cflags=',
#8 46.79 gyp verb cli   '--libsass_ldflags=',
#8 46.79 gyp verb cli   '--libsass_library=' ]
#8 46.79 gyp info using node-gyp@3.8.0
#8 46.79 gyp info using node@8.17.0 | linux | arm64
#8 46.79 gyp verb command rebuild []
#8 46.79 gyp verb command clean []
#8 46.79 gyp verb clean removing "build" directory
#8 46.79 gyp verb command configure []
#8 46.79 gyp verb check python checking for Python executable "python2" in the PATH
#8 46.79 gyp verb `which` failed Error: not found: python2
#8 46.79 gyp verb `which` failed     at getNotFoundError (/opt/oddslingers.poker/core/js/node_modules/which/which.js:13:12)
#8 46.79 gyp verb `which` failed     at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:19)
#8 46.79 gyp verb `which` failed     at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5
#8 46.79 gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
#8 46.79 gyp verb `which` failed  python2 { Error: not found: python2
#8 46.79 gyp verb `which` failed     at getNotFoundError (/opt/oddslingers.poker/core/js/node_modules/which/which.js:13:12)
#8 46.79 gyp verb `which` failed     at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:19)
#8 46.79 gyp verb `which` failed     at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5
#8 46.79 gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
#8 46.79 gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (/opt/oddslingers.poker/core/js/node_modules/which/which.js:13:12)\n    at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:19)\n    at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)\n    at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16\n    at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5\n    at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
#8 46.79 gyp verb `which` failed   code: 'ENOENT' }
#8 46.79 gyp verb check python checking for Python executable "python" in the PATH
#8 46.79 gyp verb `which` failed Error: not found: python
#8 46.79 gyp verb `which` failed     at getNotFoundError (/opt/oddslingers.poker/core/js/node_modules/which/which.js:13:12)
#8 46.79 gyp verb `which` failed     at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:19)
#8 46.79 gyp verb `which` failed     at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5
#8 46.79 gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
#8 46.79 gyp verb `which` failed  python { Error: not found: python
#8 46.79 gyp verb `which` failed     at getNotFoundError (/opt/oddslingers.poker/core/js/node_modules/which/which.js:13:12)
#8 46.79 gyp verb `which` failed     at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:19)
#8 46.79 gyp verb `which` failed     at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5
#8 46.79 gyp verb `which` failed     at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5
#8 46.79 gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
#8 46.79 gyp verb `which` failed   stack: 'Error: not found: python\n    at getNotFoundError (/opt/oddslingers.poker/core/js/node_modules/which/which.js:13:12)\n    at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:19)\n    at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)\n    at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16\n    at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5\n    at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
#8 46.79 gyp verb `which` failed   code: 'ENOENT' }
#8 46.79 gyp ERR! configure error 
#8 46.79 gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
#8 46.79 gyp ERR! stack     at PythonFinder.failNoPython (/opt/oddslingers.poker/core/js/node_modules/node-gyp/lib/configure.js:484:19)
#8 46.79 gyp ERR! stack     at PythonFinder.<anonymous> (/opt/oddslingers.poker/core/js/node_modules/node-gyp/lib/configure.js:406:16)
#8 46.79 gyp ERR! stack     at F (/opt/oddslingers.poker/core/js/node_modules/which/which.js:68:16)
#8 46.79 gyp ERR! stack     at E (/opt/oddslingers.poker/core/js/node_modules/which/which.js:80:29)
#8 46.79 gyp ERR! stack     at /opt/oddslingers.poker/core/js/node_modules/which/which.js:89:16
#8 46.79 gyp ERR! stack     at /opt/oddslingers.poker/core/js/node_modules/isexe/index.js:42:5
#8 46.79 gyp ERR! stack     at /opt/oddslingers.poker/core/js/node_modules/isexe/mode.js:8:5
#8 46.79 gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
#8 46.79 gyp ERR! System Linux 5.10.104-linuxkit
#8 46.79 gyp ERR! command "/usr/local/bin/node" "/opt/oddslingers.poker/core/js/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
#8 46.79 gyp ERR! cwd /opt/oddslingers.poker/core/js/node_modules/node-sass
#8 46.79 gyp ERR! node -v v8.17.0
#8 46.79 gyp ERR! node-gyp -v v3.8.0
#8 46.79 gyp ERR! not ok 
#8 46.79 Build failed with error code: 1
------
executor failed running [/bin/sh -c yarn install]: exit code: 1
ERROR: Service 'webpack' failed to build : Build failed

I'm experiencing this error during the webpack build. I have tried installing python2 and changing the PYTHON env variable with yarn, nothing seems to help the issue.

I use a MacBook Air M1 2020. Mac Os version: Monterey

Psami-wondah commented 1 year ago

Fixed by installing sass v1.26.10 instead of node-sass-chokidar. And I also changed the node version to 14 to make It compatible with the sass version.