codefordenver / partner-finder

Using an open dataset with registered colorado business to build a tool that manages outreach to potential CFD partners.
3 stars 14 forks source link

Run yarn install python issue #194

Closed anastasialanz closed 2 years ago

anastasialanz commented 2 years ago

Hi there! I was looking to contribute but I'm having trouble running docker-compose for the RUN yarn install step from this command docker-compose up --build -d. Is there something else I need to do to get this working?

This is the error output:

=> ERROR [5/6] RUN yarn install                                                                             27.1s
------                                                                                                             
 > [5/6] RUN yarn install:                                                                                         
#9 0.306 yarn install v1.22.5                                                                                      
#9 0.361 [1/4] Resolving packages...                                                                               
#9 0.534 [2/4] Fetching packages...                                                                                
#9 21.60 info fsevents@1.2.13: The platform "linux" is incompatible with this module.                              
#9 21.60 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
#9 21.61 [3/4] Linking dependencies...
#9 21.61 warning "@emotion/styled > @emotion/babel-plugin@11.3.0" has unmet peer dependency "@babel/core@^7.0.0".
#9 21.61 warning "@emotion/styled > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
#9 26.59 [4/4] Building fresh packages...
#9 26.91 error /app/node_modules/deasync: Command failed.
#9 26.91 Exit code: 1
#9 26.91 Command: node ./build.js
#9 26.91 Arguments: 
#9 26.91 Directory: /app/node_modules/deasync
#9 26.91 Output:
#9 26.91 gyp info it worked if it ends with ok
#9 26.91 gyp info using node-gyp@7.1.2
#9 26.91 gyp info using node@16.9.1 | linux | arm64
#9 26.91 gyp ERR! find Python 
#9 26.91 gyp ERR! find Python Python is not set from command line or npm configuration
#9 26.91 gyp ERR! find Python Python is not set from environment variable PYTHON
#9 26.91 gyp ERR! find Python checking if "python3" can be used
#9 26.91 gyp ERR! find Python - "python3" is not in PATH or produced an error
#9 26.91 gyp ERR! find Python checking if "python" can be used
#9 26.91 gyp ERR! find Python - "python" is not in PATH or produced an error
#9 26.91 gyp ERR! find Python checking if "python2" can be used
#9 26.91 gyp ERR! find Python - "python2" is not in PATH or produced an error
#9 26.91 gyp ERR! find Python 
#9 26.91 gyp ERR! find Python **********************************************************
#9 26.91 gyp ERR! find Python You need to install the latest version of Python.
#9 26.91 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#9 26.91 gyp ERR! find Python you can try one of the following options:
#9 26.91 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#9 26.91 gyp ERR! find Python   (accepted by both node-gyp and npm)
#9 26.91 gyp ERR! find Python - Set the environment variable PYTHON
#9 26.91 gyp ERR! find Python - Set the npm configuration variable python:
#9 26.91 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#9 26.91 gyp ERR! find Python For more information consult the documentation at:
#9 26.91 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#9 26.91 gyp ERR! find Python **********************************************************
#9 26.91 gyp ERR! find Python 
#9 26.91 gyp ERR! configure error 
#9 26.91 gyp ERR! stack Error: Could not find any Python installation to use
#9 26.91 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:302:47)
#9 26.91 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
#9 26.91 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
#9 26.91 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
#9 26.91 gyp ERR! stack     at exithandler (node:child_process:404:5)
#9 26.91 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:416:5)
#9 26.91 gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
#9 26.91 gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
#9 26.91 gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
#9 26.91 gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#9 26.91 gyp ERR! System Linux 5.10.47-linuxkit
#9 26.91 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#9 26.91 gyp ERR! cwd /app/node_modules/deasync
#9 26.91 gyp ERR! node -v v16.9.1
#9 26.91 gyp ERR! node-gyp -v v7.1.2
#9 26.91 gyp ERR! not ok 
#9 26.91 Build failed
#9 26.91 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
executor failed running [/bin/sh -c yarn install]: exit code: 1
ERROR: Service 'frontend' failed to build : Build failed
galbwe commented 2 years ago

Hey @anastasialanz I cloned a fresh copy of the repo and could not reproduce this bug.

What OS are you using? Also, if you cd into the frontend directory and run yarn and then yarn dev, do you see the same error?

anastasialanz commented 2 years ago

Hi @galbwe, I'm on MacOS Big Sur version 11.6 with the M1 chip. Running yarn and yarn dev in the frontend directory work fine for me.

I'm seeing a similar issue to this https://github.com/docker/getting-started/issues/124

anastasialanz commented 2 years ago

Got it running! I'll push a PR for anyone that's on an M1.