Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello everyone, we tried setting up out local development environment with a Mac M1 machine and our

Options
U01AM1YGRC2
U01AM1YGRC2 Posts: 71 🧑🏻‍🚀 - Cadet
edited July 2022 in Help

Hello everyone,
we tried setting up out local development environment with a Mac M1 machine and our Project (Yves and Zed).

For this we used both
• 1 try: docker/sdk on master branch + update deploy.dev.yml like https://docs.spryker.com/docs/scos/dev/setup/installing-spryker-with-docker/installat[…]uides/installing-in-development-mode-on-macos-and-linux.html describes
• and 2 try: on the m1-adjustments branch from docker/sdk
So both seems been working, as the application starts without problems.

Now we tried the frontend file generation / assets + static assets build from Yves — > which results into some issues caused by the node-sass problem with M1 (on arm machines).
For that we had an information to update some packages in the package.json:

-    "@spryker/oryx-for-zed": "~2.10.1",
+    "@spryker/oryx-for-zed": "~2.11.5",

-    "node-sass": "~4.14.1",

+    "sass": "~1.32.13",

-    "sass-loader": "~8.0.0",
+    "sass-loader": "~10.2.0",

and a simple change at development.js like this page describes: https://docs.spryker.com/docs/scos/dev/setup/installing-spryker-with-docker/installat[…]uides/installing-in-development-mode-on-macos-and-linux.html - changing node-sass with sass package

So now we were able to build our Yves frontend again and it was working, also with the watch script - working well so far.

But now with the adjustments fron new npm packages, we’re face with an issue in the Zed backend. The publicPath for generating assets now changes from /public/Zed to /public/Backoffice --> this could be fixed by overwriting the configuration.path with zed-build.js - for our dev reasons okay so far.

// From this
api.getConfiguration(settings)
    .then(configuration => oryx.build(configuration))
    .catch(error => console.error('An error occurred while creating configuration', error));

// to this
api.getConfiguration(settings)
    .then(configuration => {
        configuration.output.path = '/data/public/Zed/assets/'
        oryx.build(configuration)
    })
    .catch(error => console.error('An error occurred while creating configuration', error));

This leads to a shiny Zed Backend with css and js. Well done or?

The only thing we have problem currently is that dataTabels ain’t working again. And we couldn’t find the reason for this.
So the question is, has anyone the same issue with Zed / Backoffice assets generation and has anyone an idea how to fix dataTables issues with this M1 setup and can us help?

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,034 ⚖️ - Guardians (admin)
    Options

    Hey, did you try it with a fresh demoshop or an existing project

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 🧑🏻‍🚀 - Cadet
    Options

    Hello Florian, we tried with an existing project where we want to use Zed already 🙂

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,034 ⚖️ - Guardians (admin)
    Options

    ok, for me it sounds a bit like a bug in providing backwards compatibility 😕 - Can you maybe fill in an official support ticket for this?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options

    Might be better to update the project instead of escalating to support IMO.
    The project has to be up-to-date anyway.

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 🧑🏻‍🚀 - Cadet
    Options

    @valerii.trots & @florian.scholz don’t think we can’t simply update the zed or switch to Backoffice. What do you think @UPWG9AYH2 can we switch over to Backoffice in this way? Maybe the question is more, is this dataTable issue we are facing here with this config and Zed backend just a problem coming up with the oryx-for-zed update?

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,034 ⚖️ - Guardians (admin)
    Options

    Hey, “just a problem coming up with the oryx-for-zed update” - i can not answer that. I saw the exception already somewhere sometime but not sure anymore how the project solved it. in the releaselog i can currently just find this: https://github.com/spryker/oryx-for-zed/releases/tag/2.11.3

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    Following the migration guide for the different backend endpoints i also got on npm install step

    info looking for cached prebuild @ /home/spryker/.npm/_prebuilds/c969b0-iltorb-v2.4.5-node-v72-linuxmusl-arm64.tar.gz
    http request GET https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v72-linuxmusl-arm64.tar.gz
    http 404 https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v72-linuxmusl-arm64.tar.gz
    WARN install No prebuilt binaries found (target=12.22.12 runtime=node arch=arm64 libc=musl platform=linux)

    its also a dependency in the current b2b demo shop … won’t this work on m1 macs? whats wrong here?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options
  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    yes, i did, but failed on npm install in that step too

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    any special spryker php image required?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options
  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options

    Otherwise I can't help anyhow as I don't use Apple hardware.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options
    image:
        tag: spryker/php:7.4
    
  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    i think it should support

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    hmmm …

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    let me try rebuild

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    no change …

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    okay, same seems to happen on current b2b-demo shop install

    ╰─$ npm install

    iltorb@2.4.5 install /data/node_modules/iltorb
    node ./scripts/install.js || node-gyp rebuild

    info looking for cached prebuild @ /home/spryker/.npm/_prebuilds/c969b0-iltorb-v2.4.5-node-v72-linuxmusl-arm64.tar.gz
    http request GET https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v72-linuxmusl-arm64.tar.gz
    http 404 https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v72-linuxmusl-arm64.tar.gz
    WARN install No prebuilt binaries found (target=12.22.12 runtime=node arch=arm64 libc=musl platform=linux)
    gyp ERR! find Python
    gyp ERR! find Python Python is not set from command line or npm configuration
    gyp ERR! find Python Python is not set from environment variable PYTHON
    gyp ERR! find Python checking if “python” can be used
    gyp ERR! find Python - “python” is not in PATH or produced an error
    gyp ERR! find Python checking if “python2” can be used
    gyp ERR! find Python - “python2" is not in PATH or produced an error
    gyp ERR! 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! find Python Node-gyp should be able to find and use Python. If not,
    gyp ERR! find Python you can try one of the following options:
    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 - Set the environment variable PYTHON
    gyp ERR! find Python - Set the npm configuration variable python:
    gyp ERR! 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! find Python **********************************************************
    gyp ERR! find Python
    gyp ERR! configure error
    gyp ERR! stack Error: Could not find any Python installation to use
    gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
    gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
    gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
    gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
    gyp ERR! stack at exithandler (child_process.js:315:5)
    gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5)
    gyp ERR! stack at ChildProcess.emit (events.js:314:20)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    gyp ERR! stack at onErrorNT (internal/child_process.js:470:16)
    gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
    gyp ERR! System Linux 5.10.104-linuxkit
    gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
    gyp ERR! cwd /data/node_modules/iltorb
    gyp ERR! node -v v12.22.12
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    but docker/sdk master branch is okay or another sdk is required?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options

    Master branch should be ok.

  • U03V0SXHU13
    U03V0SXHU13 Posts: 8 🧑🏻‍🚀 - Cadet
    Options

    @UPWG9AYH2 if it’s any help, I think you are probably using the alpine linux based image, which does not include Python. Try using the debian based php image which includes python. I used spryker/php:8.0-debian and python was in there.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    Options

    @U03V0SXHU13 thanks, i’ll try that