akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
950 stars 512 forks source link

Module not found: Error: Can't resolve 'akeneo-design-system' #15016

Open cbepxpa3ym opened 2 years ago

cbepxpa3ym commented 2 years ago

I have installed the patch on prod server by following this instructions: https://docs.akeneo.com/5.0/migrate_pim/apply_patch/apply_patch_ce.html

However, I am getting the error when I run the last command "yarn run webpack": Module not found: Error: Can't resolve 'akeneo-design-system'

What to do?

cbepxpa3ym commented 2 years ago

Is this project alive?

janmyszkier commented 2 years ago

@cbepxpa3ym this should fix it for you:

yarn --cwd=vendor/akeneo/pim-community-dev/akeneo-design-system install --frozen-lockfile
yarn --cwd=vendor/akeneo/pim-community-dev/akeneo-design-system run lib:build

and then yarn run webpack should work

normally,

make upgrade-front

would built it for you (and was mentioned in the upgrade page here: https://docs.akeneo.com/5.0/migrate_pim/upgrade/upgrade_from_40_to_50.html# , but I suppose you either skipped that or tried to manually run the equivalents

cbepxpa3ym commented 2 years ago

I was not upgrading it from old version. It is 5.x, and I was applying a patch. So I am confused.

cbepxpa3ym commented 2 years ago

Also the "make upgrade-front" says: make: *** No rule to make target 'upgrade-front'. Stop.

What to do?

sebadamus commented 2 years ago

Hi, should this apply the same for v5 to v6? Because I tried... it passes "yarn run webpack" but then web page wont pass login screen, it stays in running Akeneo animation indefinitely... imagen

I wrote some steps to kind of solve it for me... now I am in latest Version: CE 5.0.97 version but cant get to v6 (would that be possible?)

These are the steps that worked for me to update to latest v5 (not v6)

cd /var/www/html (here is where my akeneo installation) (here I change permissions to the user I use on the installation, then I change back to www-data, it went easy for me this way, as if you run www-data user dont have home, well it has but its /var/www and its not owner.) sudo chown -R $USER:$USER /var/www/html/ composer --prefer-dist update sudo service php7.4-fpm restart rm -rf var/cache/ ./public/bundles/ ./public/css/ ./public/js/ rm yarn.lock bin/console pim:installer:assets bin/console cache:warmup yarn run update-extensions yarn install yarn run less yarn --cwd=vendor/akeneo/pim-community-dev/akeneo-design-system install --frozen-lockfile yarn --cwd=vendor/akeneo/pim-community-dev/akeneo-design-system run lib:build yarn run webpack sudo chown -R www-data:www-data /var/www/html/ sudo service apache2 restart sudo service php7.4-fpm restart sudo service elasticsearch restart

Tomasz-Silpion commented 3 months ago

In my case I've had to run npm run packages:build first. Then yarn run webpack processed normally and generated required assets in public/dist directory.