FlowFuse / FlowFuse/flowfuse

Race condition when Node-RED loads modules for Function node

Open
#2,142 1 comment 0 reactions 0 assignees View on GitHub
type:bug upstream
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 21h
Merged PRs (30d)
146

Description

### Current Behavior

When multiple function nodes load modules they all get separate `npm install` commands run in parallel.

This leads to race conditions updating the `package.json` and also clearing out of cache and pre-installed modules.

See Upstream Node-RED issue for more details https://github.com/node-red/node-red/issues/4168

### Expected Behavior

Nodes to be installed atomically

### Steps To Reproduce

_No response_

### Environment

- FlowForge version: 1.7
- Node.js version: 16.x
- npm version: 8.x
- Platform/OS: All
- Browser: All

### Have you provided an initial effort estimate for this issue?

I have not provided an estimate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.