Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Error /opt/app-root/src/.node-red/package.json not found #165

@johnwalicki

Description

@johnwalicki

When installing additional packages from the Node-RED Manage Palette into a Node-RED Starter container running on IBM Cloud Code Engine, there is an error message:

msg : error
"Error: ENOENT: no such file or directory, open '/opt/app-root/src/.node-red/package.json'"

The packages get installed successfully, but the error message confuses users.

@hammoaj suggests a tweak to avoid this errors when installing new nodes from the Manage Palette. It looks as if later versions of Node-RED expect a package.json file to be present in the data directory to update when you install a new node, and it errors if it isn’t there.

A minimal package.json file is needed as it will lose the content between redeploys (unless the data directory is mapped to a persistent volume which it typically won’t be on Code Engine).

The build pipeline should copy in a simple package.json to /opt/app-root/src/.node-red/package.json

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions