Why I am getting Can't resolve 'jQuery=jquery' on assets install?

86 Views Asked by At

When running php bin/console oro:assets:build, I have 11 errors like this one :

ERROR in ../node_modules/jquery-form/src/jquery.form.js 2:20-44
  Module not found: Error: Can't resolve 'jQuery=jquery' in '/var/www/node_modules/jquery-form/src'
   @ ./bundles/oroui/js/widget/abstract-widget.js 26:2-24
   @ ./bundles/oroui/js/widget/block-widget.js
   @ ./build/admin/dynamic-imports.js 63:11-65:23
   @ ./bundles/oroui/js/app/services/load-modules.js 1:16-42
   @ ./bundles/oroui/js/polyfills.js 1:0-61 5:17-28
   @ ./bundles/oroui/js/app.js 8:29-59

Do you know what is the problem?

Thanks for helping.

1

There are 1 best solutions below

0
On BEST ANSWER

It looks like you have installed the application from the master branch that is unstable and should never be used in production.

Instead, you can install the latest stable long term support version, which is 4.2 LTS. To do this, please follow the official documentation: https://doc.oroinc.com/backend/setup/installation/#install-oro-application

The important step in your case is the first command, that downloads the latest stable version of the application:

# OroCRM Community Edition
composer create-project oro/crm-application my_project_name --repository=https://satis.oroinc.com

Alternatively, if you want to clone it using git, you can run

git clone -b 4.2.3 https://github.com/oroinc/crm-application my_project_name

It's important to clone tag 4.2.3 that is the latest stable.