akeneo / pim-community-dev

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

Can't resolve '@akeneo-pim-community/catalogs' #19696

Open EnyroomOskar opened 1 year ago

EnyroomOskar commented 1 year ago

Hi! When following the instructions on the pim-community-standard page to download and install Akeneo Community Edition Standard through Docker, I get the following errors during installation. I use Ubuntu 22.04 with Docker

ERROR in ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp/Catalog/ConnectedAppCatalogContainer.tsx 65:17-58
Module not found: Error: Can't resolve '@akeneo-pim-community/catalogs' in '/home/<user>/akeneo/node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp/Catalog'
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/pages/ConnectedAppCatalogPage.tsx 12:37-111
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/infrastructure/ConnectedApps.tsx 32:32-83
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/index.ts 16:22-63
 @ ./public/bundles/akeneoconnectivityconnection/js/controller/apps.tsx 20:32-88
 @ ./public/js/module-registry.js 2:525-591 2:100286-100356
 @ ./vendor/akeneo/pim-community-dev/frontend/webpack/require-context.js
 @ ./public/bundles/pimui/js/form/builder.js
 @ ./public/bundles/pimui/js/index.js

ERROR in ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp/ConnectedAppContainer.tsx 94:17-58
Module not found: Error: Can't resolve '@akeneo-pim-community/catalogs' in '/home/<user>/akeneo/node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp'
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/pages/ConnectedAppPage.tsx 11:30-89
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/infrastructure/ConnectedApps.tsx 28:25-69
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/index.ts 16:22-63
 @ ./public/bundles/akeneoconnectivityconnection/js/controller/apps.tsx 20:32-88
 @ ./public/js/module-registry.js 2:525-591 2:100286-100356
 @ ./vendor/akeneo/pim-community-dev/frontend/webpack/require-context.js
 @ ./public/bundles/pimui/js/form/builder.js
 @ ./public/bundles/pimui/js/index.js

ERROR in ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/pages/ConnectedAppCatalogPage.tsx 14:17-58
Module not found: Error: Can't resolve '@akeneo-pim-community/catalogs' in '/home/<user>/akeneo/node_modules/@akeneo-pim-community/connectivity-connection/src/connect/pages'
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/infrastructure/ConnectedApps.tsx 32:32-83
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/index.ts 16:22-63
 @ ./public/bundles/akeneoconnectivityconnection/js/controller/apps.tsx 20:32-88
 @ ./public/js/module-registry.js 2:525-591 2:100286-100356
 @ ./vendor/akeneo/pim-community-dev/frontend/webpack/require-context.js
 @ ./public/bundles/pimui/js/form/builder.js
 @ ./public/bundles/pimui/js/index.js

When I run yarn run webpack --stats-error-details I get the following:

ERROR in ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp/Catalog/ConnectedAppCatalogContainer.tsx 69:17-58
Module not found: Error: Can't resolve '@akeneo-pim-community/catalogs' in '/home/<user>/akeneo/node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp/Catalog'
resolve '@akeneo-pim-community/catalogs' in '/home/<user>/akeneo/node_modules/@akeneo-pim-community/connectivity-connection/src/connect/components/ConnectedApp/Catalog'
  Parsed request is a module
  using description file: /home/<user>/akeneo/node_modules/@akeneo-pim-community/connectivity-connection/package.json (relative path: ./src/connect/components/ConnectedApp/Catalog)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /home/<user>/akeneo/public/bundles
        single file module
          using description file: /home/<user>/akeneo/package.json (relative path: ./public/bundles/@akeneo-pim-community/catalogs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/public/bundles/@akeneo-pim-community/catalogs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/public/bundles/@akeneo-pim-community/catalogs.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/public/bundles/@akeneo-pim-community/catalogs.json doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/public/bundles/@akeneo-pim-community/catalogs.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/public/bundles/@akeneo-pim-community/catalogs.tsx doesn't exist
        /home/<user>/akeneo/public/bundles/@akeneo-pim-community/catalogs doesn't exist
      looking for modules in /home/<user>/akeneo/node_modules
        single file module
          using description file: /home/<user>/akeneo/package.json (relative path: ./node_modules/@akeneo-pim-community/catalogs)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/node_modules/@akeneo-pim-community/catalogs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/node_modules/@akeneo-pim-community/catalogs.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/node_modules/@akeneo-pim-community/catalogs.json doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/node_modules/@akeneo-pim-community/catalogs.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/<user>/akeneo/node_modules/@akeneo-pim-community/catalogs.tsx doesn't exist
        /home/<user>/akeneo/node_modules/@akeneo-pim-community/catalogs doesn't exist
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/connect/pages/ConnectedAppCatalogPage.tsx 12:37-111
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/infrastructure/ConnectedApps.tsx 36:32-83
 @ ./node_modules/@akeneo-pim-community/connectivity-connection/src/index.ts 16:22-63
 @ ./public/bundles/akeneoconnectivityconnection/js/controller/apps.tsx 20:32-88
 @ ./public/js/module-registry.js 2:525-591 2:100286-100356
 @ ./vendor/akeneo/pim-community-dev/frontend/webpack/require-context.js
 @ ./public/bundles/pimui/js/form/builder.js
 @ ./public/bundles/pimui/js/index.js

I've tried removing the node_modules folder and yarn.lock file as well as following the steps in #15223 (though I do use Docker so didn't expect it to work anyway).

Any help?

EnyroomOskar commented 1 year ago

I've managed to make this work by using the "7.0.*@stable" package mentioned on the website instead of the "dev-master@dev" that's mentioned in the readme.

Now I have a different issue though: two of the containers aren't running inside Docker (the node and php ones), and I'm getting no logs or error messages. Everything appears to be working fine frontend-wise, but I can't run bin/console commands because the php container isn't running. So if anyone could help me with that instead, that'd be much appreciated!