Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049918Openbravo ERPA. Platformpublic2022-08-01 09:502022-08-12 10:43
cberner 
Triage Platform Base 
normalminorhave not tried
closedfixed 
5
 
PR22Q4 
Core
No
0049918: npm install generates changes by default
By default, since the update to node 16 and npm 8, when npm install is executed, there are changes in package-lock.json file.

This is due to a flag that is required but not enforced, which is --legacy-peer-deps. Executing npm install --legacy-peer-deps does not generate changes on package-lock.json file.
1. Have an openbravo environment locally
2. Run npm install command

Check that there are changes in package-lock.json

3. Run npm install --legacy-peer-deps
Check that there are no changes in package-lock.json
Create a new file .npmrc at openbravo root level, and include in it the following line:

legacy-peer-deps=true

This will enforce the flag when we run npm install from the main openbravo directory.
No tags attached.
Issue History
2022-08-01 09:50cbernerNew Issue
2022-08-01 09:50cbernerAssigned To => Triage Platform Base
2022-08-01 09:50cbernerModules => Core
2022-08-01 09:50cbernerTriggers an Emergency Pack => No
2022-08-01 09:54hgbotNote Added: 0139758
2022-08-12 10:43hgbotResolutionopen => fixed
2022-08-12 10:43hgbotStatusnew => closed
2022-08-12 10:43hgbotFixed in Version => PR22Q4
2022-08-12 10:43hgbotNote Added: 0140084
2022-08-12 10:43hgbotNote Added: 0140085

Notes
(0139758)
hgbot   
2022-08-01 09:54   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/660 [^]
(0140084)
hgbot   
2022-08-12 10:43   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: d7549d36aadff6199f14a05d5dee8c55aff60071
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 12-08-2022 08:38:27
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/d7549d36aadff6199f14a05d5dee8c55aff60071 [^]

Fixes ISSUE-49918: npm install generates changes by default

To fix this, an .npmrc file has been added, which enforces the
--legacy-peer-deps flag to be added on the npm install executed from the
openbravo root directory. This makes sure there are no changes on the
package-lock.json file

---
A .npmrc
---
(0140085)
hgbot   
2022-08-12 10:43   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/660 [^]