Fixed
Details
Assignee
Benjamin ReedBenjamin ReedReporter
MortezaMortezaSprint
NoneFix versions
Priority
Major
Details
Details
Assignee
Benjamin Reed
Benjamin ReedReporter
Morteza
MortezaSprint
None
Fix versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created October 28, 2022 at 2:24 PM
Updated November 7, 2022 at 4:23 PM
Resolved November 7, 2022 at 4:23 PM
We hit an interesting issue where when we update the package-lock.json file the eslint command fails. (Example: https://app.circleci.com/pipelines/github/OpenNMS/opennms/25182/workflows/520c6cb7-70fe-47bd-ac2e-58de4137ad62/jobs/195003)
After a bit of investigation, I found that the issue might be with NPM cache going out of sync.
To resolve the issue on my own brach, I made this modification:
In
opennms/core/web-assets/ci.js
add the following lines after line 33 `{_}console.info('node_modules is potentially out of date compared to package-lock.json');{_}`
const cache_cleanup_child = child_process.execFile(path.join(__dirname, 'target', 'node', 'npm'), ['cache', 'clean', '--force']); cache_cleanup_child.stdout.pipe(process.stdout); cache_cleanup_child.stderr.pipe(process.stderr);