Good morning, We want to setup a project with the ...
# docker
d
Good morning, We want to setup a project with the PHP 8.0 alpine docker container from Spryker
Copy code
image:
    tag: spryker/php:8.0-alpine3.13
But we get the following error on 
frontend:project:install-dependencies
Copy code
Install Project dependencies
[info] npm
[info]  WARN
[info]  prepare removing existing node_modules/ before installation

[info] 
> core-js@3.4.8 postinstall /data/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


[info] 
> fsevents@1.2.13 install /data/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js


[info] 

[info] Skipping 'fsevents' build as platform linux is not supported

[info] 
> node-sass@4.14.1 install /data/node_modules/node-sass
> node scripts/install.js


[info] Cached binary found at /home/spryker/.npm/_cacache/node-sass/4.14.1/linux_musl-x64-83_binding.node

[info] 
> node-sass@4.14.1 postinstall /data/node_modules/node-sass
> node scripts/build.js


[info] Binary found at /data/node_modules/node-sass/vendor/linux_musl-x64-83/binding.node

[info] Testing binary

[info] Binary is fine

[info] 
> iltorb@2.4.5 install /data/node_modules/iltorb
> node ./scripts/install.js || node-gyp rebuild


[info] info
[info]  looking for cached prebuild @ /home/spryker/.npm/_cacache/_prebuilds/80989c-iltorb-v2.4.5-node-v83-linuxmusl-x64.tar.gz

[info] http
[info]  request GET <https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v83-linuxmusl-x64.tar.gz>

[info] http
[info]  404 <https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v83-linuxmusl-x64.tar.gz>

[info] WARN install No prebuilt binaries found (target=14.18.1 runtime=node arch=x64 libc=musl platform=linux)

[info] gyp
[info]  
[info] ERR! find Python 
gyp 
[info] ERR!
[info]  find Python
[info]  Python is not set from command line or npm configuration

[info] gyp ERR! find Python Python is not set from environment variable PYTHON
gyp 
[info] ERR! find Python checking if "python" can be used

[info] gyp ERR! find Python - "python" is not in PATH or produced an error

[info] gyp 
[info] ERR! 
[info] find Python checking if "python2" can be used

[info] gyp ERR!
[info]  
[info] find Python
[info]  - "python2" is not in PATH or produced an error
gyp ERR! 
[info] find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR!
[info]  
[info] find Python
[info]  Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:

[info] gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python
[info]  - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:

[info] gyp ERR! 
[info] find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python <https://github.com/nodejs/node-gyp#installation>
gyp ERR! 
[info] find Python **********************************************************
gyp ERR! find Python 

[info] gyp
[info]  ERR! configure error 

[info] gyp 
[info] ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
gyp ERR! 
[info] stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
gyp ERR! stack     at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:390:5)
gyp ERR!
[info]  stack     at ChildProcess.errorhandler (child_process.js:402:5)
gyp 
[info] ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp 
[info] ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:280:12)
gyp ERR! stack
[info]      at onErrorNT (internal/child_process.js:469:16)
gyp 
[info] ERR! stack
[info]      at processTicksAndRejections (internal/process/task_queues.js:82:21)

[info] gyp 
[info] ERR! System Linux 5.10.47-linuxkit
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

[info] gyp ERR!
[info]  cwd /data/node_modules/iltorb

[info] gyp
[info]  ERR! node -v v14.18.1

[info] gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

[info] added 1359 packages in 19.123s
Does anyone have an idea what we can do to fix this? The troubleshooting.md doesn't really help in this case.
l
can you try to delete node_modules/ folder and then try again? That helps me when I get similar errors suddenly
d
I don't have a node_modules folder because that happens on
npm install
l
So you’re doing that from scratch? You may not see node_modules on your host machine, but it is present inside the container. So I do
docker/sdk cli rm -rf node_modules
and try again
d
Sadly, we have the same behavior
I tried it with the B2B demo shop too. Same behavior...
I didn't adjust the YAML files. There is still this configuration:
Copy code
image:
  tag: spryker/php:7.3-alpine3.12