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, just tried oryx for zed with the “simple” version described in

UPWG9AYH2
UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

Hello,
just tried oryx for zed with the “simple” version described in https://documentation.spryker.com/v4/docs/oryx-for-zed
Unfortunately I am no frontend developer but what I expect after running
npm run build-zed
is that the zed backend gets build with all its magic …

But the output is

find
● looking for entry points...
✔ 79 found

find
● resolving core modules deps...
✔ 0 found

build
● using webpack 4.27.1
● building assets...
● webpack output:

ERROR in ./vendor/spryker/gui/assets/Zed/sass/main.scss
Module build failed (from ./node_modules/@spryker/oryx-for-zed/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/@spryker/oryx-for-zed/node_modules/sass-loader/lib/loader.js):

@import '~bootstrap-sass/assets/stylesheets/bootstrap';
^
   File to import not found or unreadable: ~bootstrap-sass/assets/stylesheets/bootstrap.
   in /Users/ikaiser/projects/suite/vendor/spryker/gui/assets/Zed/sass/main.scss (line 8, column 1)
  at /Users/ikaiser/projects/suite/node_modules/@spryker/oryx-for-zed/node_modules/webpack/lib/NormalModule.js:301:20
  at /Users/ikaiser/projects/suite/node_modules/loader-runner/lib/LoaderRunner.js:367:11
  at /Users/ikaiser/projects/suite/node_modules/loader-runner/lib/LoaderRunner.js:233:18
  at context.callback (/Users/ikaiser/projects/suite/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
  at Object.callback (/Users/ikaiser/projects/suite/node_modules/@spryker/oryx-for-zed/node_modules/sass-loader/lib/loader.js:67:13)
  at Object.done [as callback] (/Users/ikaiser/projects/suite/node_modules/neo-async/async.js:8067:18)
  at options.error (/Users/ikaiser/projects/suite/node_modules/node-sass/lib/index.js:294:32)
 @ ./vendor/spryker/gui/assets/Zed/js/modules/commons.js 43:0-31
 @ ./vendor/spryker/gui/assets/Zed/js/spryker-zed-gui-commons.entry.js
...

There is a very long list with packages that can not be resolved and if i look for example in the file above, there is indeed no bootstrap-sass folder in vendor that could be resolved but it is required in main.scss

@import '~bootstrap-sass/assets/stylesheets/bootstrap';

But it seems required in the packages.json of the gui module. But its not installed yet.
Why is it not installed implicit with npm run build-zed? What to do to resolve all these missing dependencies?

Best regards

Comments

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 🧑🏻‍🚀 - Cadet

    you did "npm install" before?

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    edited May 2020

    npm install is not enough

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    vendor/bin/console frontend:project:install-dependencies
    vendor/bin/console frontend:zed:install-dependencies
    npm run zed
    
  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Good morning,
    it seem the dependencies where installed but only in the container. This is because the node_modules directory is not synced to the container … i can remind that its best to install frontend stuff directly on the host machine due to better performance, so i did for “npm install” but called the dependencies install command only in the container … anyway this will collide somehow since its not synced when i install all proper on my host machine but get no link to the docker container … so does anything speak against removing the node_modules folder from the dockerignore file?
    How do you usually proceed here?

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 🧑🏻‍🚀 - Cadet

    Good morning, I run everything in my containers. You also can make phing builds to trigger it from outside

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

    But then you will not see the node_modules folder outside from your container and the files where references are in will show errors, right?

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

    in your IDE