Node-Red Git Connection commit the wrong package.json

Hello Node-Red Community,
I'm facing an issue.
I connected a remote git and push my existing node-red project to it.
The package.json in remote repo looks like:

{
    "name": "Testprojekt",
    "description": "A Node-RED Project",
    "version": "0.0.1",
    "dependencies": {},
    "node-red": {
        "settings": {
            "flowFile": "flows.json",
            "credentialsFile": "flows_cred.json"
        }
    }
}

That is not correct.
I'm running node-red in a container based environment. When i cat the package.json file in terminal inside the container it looks like this:

{
    "name": "node-red-docker",
    "version": "3.1.8",
    "description": "Low-code programming for event-driven applications",
    "homepage": "http://nodered.org",
    "license": "Apache-2.0",
    "repository": {
        "type": "git",
        "url": "https://github.com/node-red/node-red-docker.git"
    },
    "private": true,
    "scripts": {
        "start": "node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS",
        "debug": "node --inspect=0.0.0.0:9229 $NODE_OPTIONS node_modules/node-red/red.js $FLOWS",
        "debug_brk": "node --inspect=0.0.0.0:9229 --inspect-brk $NODE_OPTIONS node_modules/node-red/red.js $FLOWS"
    },
    "contributors": [
        {
            "name": "Dave Conway-Jones"
        },
        {
            "name": "Nick O'Leary"
        },
        {
            "name": "James Thomas"
        },
        {
            "name": "Raymond Mouthaan"
        }
    ],
    "dependencies": {
        "node-red": "3.1.8",
        "node-red-contrib-function-npm": "^0.4.3",
        "node-red-contrib-mssql-plus": "^0.12.2",
        "node-red-contrib-oracledb-mod": "^0.6.5"
    },
    "engines": {
        "node": ">=14"
    }
}

Here a the dependencies listet. That's for me important.
Where does the other package.json file come from?

looks like you have projects enabled, for projects, they have own package.json in project directory, not in /data you need to add dependencies to it using
menu->project->project_settngs or manually editing /data/projects/Testprojekt/package.json

1 Like

Yes I'm using projects. Thank you, that is the solution. Sorry for my late response (vacation)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.