Drenaï Posted November 12, 2022 Share Posted November 12, 2022 Hi everyone, As I am developing a new symfony based module, I am facing an issue. I have almost finished it, everything is set up and I have made my first grid. Now, in my js folder, I have made my webpack configuration based on this one : https://github.com/PrestaShop/example-modules/tree/master/demodoctrine/js So, I run npm run build and I have a bunch of errors saying :Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread"specified in "..../admin/themes/new-theme/.babelrc" at 0 It is not a path error because the files are found. It looks like I have skipped a npm install in the admin folder. In the admin/themes/new-theme, there is a package-lock.json but no package.json. Do you know where this pludin needs to be installed? Any idea about this bug? Thanks for your help! Link to comment Share on other sites More sharing options...
Drenaï Posted November 13, 2022 Author Share Posted November 13, 2022 Hi all, I actually found my the source of the issue. I was developing in a production environement. I have installed a dev environement in prestashop 1.7.8.7 and it works. Thanks Link to comment Share on other sites More sharing options...
Alex M.L. Posted June 5, 2023 Share Posted June 5, 2023 Hey @Drenaï You seem to have gone through the exact thing I am currently going through. Do you by any chance remember what exactly you did in order to make it work on the new environment? did you run anything specific or did you install a certain version of npm or anything of that sort? Link to comment Share on other sites More sharing options...
Rafał Wawiórka Posted May 7, 2024 Share Posted May 7, 2024 I managed to fix the issue in "production" environment in PrestaShop v1.7.8.9. File: index.js const $ = window.$; $(() => { const grid = new window.prestashop.component.Grid('grid'); grid.addExtension(new window.prestashop.component.GridExtensions.ReloadListExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.ExportToSqlManagerExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.FiltersResetExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.SortingExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.LinkRowActionExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.SubmitGridActionExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.SubmitBulkActionExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.BulkActionCheckboxExtension()); grid.addExtension(new window.prestashop.component.GridExtensions.SubmitRowActionExtension()); }); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now