Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] Coreminorhave not tried2021-07-15 11:352021-08-16 12:18
ReportershuehnerView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0047399: npm ci fails with nodejs 16.x in openbravo custom script (preinstall)

DescriptionRunning npm ci in source.path using Node 16.x and npm 7.x it fails in Openbravo custom preinstall code

node --version v16.4.1
npm --version 7.18.1

> install
> node $npm_package_config_install

Validating npm dependencies included in Openbravo modules...
    throw err;

Error: ENOENT: no such file or directory, stat '/home/huehner/ob/branches/pi_pos2_pg/node_modules_global'
    at Object.statSync (node:fs:1526:3)
    at __node_internal_ (node:internal/fs/utils:767:8)
    at Object.rmdirSync (node:fs:1146:15)
    at Object.<anonymous> (/home/huehner/ob/branches/pi_pos2_pg/modules/org.openbravo.client.kernel/build-scripts/install-deps.js:53:4)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47 {
  errno: -2,
  syscall: 'stat',
  code: 'ENOENT',
  path: '/home/huehner/ob/branches/pi_pos2_pg/node_modules_global'
Steps To Reproduce1.) Use nodejs 16 from the repo
deb [^] sid main

2.) Apply attached path to allow the newer node/npm versions in our version check
3.) Run npm ci in source.path
TagsNo tags attached.
Attached Filesdiff file icon hack-for-node-16.diff [^] (1,016 bytes) 2021-07-15 11:38 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0047401 acknowledgedplatform npm ci fails with node 16.x/npm 7.x 'org.openbravo.core2@*' is not in the npm registry. 

-  Notes
shuehner (administrator)
2021-07-15 11:36

Code in in backoffice but reporting as POS2 as added via pos2 project.

NodeJS 16.x will be the next Active LTS around October so we should check and try to fix this in the next 1-2 month to be able to find/fix whatever other issues are behind it.
shuehner (administrator)
2021-07-15 12:37

Problem is line 53 of modules/org.openbravo.client.kernel/build-scripts/install-deps.js

the rmDirSync('node_modules_global')
Fails if that folder does not exist (and we delete it in our pre-install file)

Possible fixes: force=true or check if exists before doing the rmDirSync call.

- Issue History
Date Modified Username Field Change
2021-07-15 11:35 shuehner New Issue
2021-07-15 11:35 shuehner Assigned To => Retail
2021-07-15 11:35 shuehner Triggers an Emergency Pack => No
2021-07-15 11:36 shuehner Note Added: 0130501
2021-07-15 11:38 shuehner File Added: hack-for-node-16.diff
2021-07-15 11:39 shuehner Steps to Reproduce Updated View Revisions
2021-07-15 12:37 shuehner Note Added: 0130506
2021-07-15 12:40 dmiguelez Resolution time => 1629928800
2021-07-15 12:40 dmiguelez Assigned To Retail => platform
2021-07-15 12:40 dmiguelez Status new => acknowledged
2021-07-15 12:41 shuehner Relationship added blocks 0047401
2021-08-16 12:18 AugustoMauch Resolution time 1629928800 => 1631656800

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker