# Node-Red Git Connection commit the wrong package.json

**URL:** <https://discourse.nodered.org/t/node-red-git-connection-commit-the-wrong-package-json/88674>\
**Category:** General\
**Tags:** docker\
**Created:** [13 June 2024 14:52 UTC](https://discourse.nodered.org/t/node-red-git-connection-commit-the-wrong-package-json/88674 "2024-06-13T14:52:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshinger](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joshinger/32/73342_2.png) [@joshinger](https://discourse.nodered.org/u/joshinger)\
**Post date:** [13 June 2024 14:52 UTC](https://discourse.nodered.org/t/node-red-git-connection-commit-the-wrong-package-json/88674/1 "2024-06-13T14:52:02Z")

</div>

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:

```auto
{
    "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:

```auto
{
    "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?

---

<div class="post-metadata">

**Author:** ![zba](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zba/32/91182_2.png) [@zba](https://discourse.nodered.org/u/zba)\
**Post date:** [14 June 2024 05:36 UTC](https://discourse.nodered.org/t/node-red-git-connection-commit-the-wrong-package-json/88674/2 "2024-06-14T05:36:17Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![joshinger](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joshinger/32/73342_2.png) [@joshinger](https://discourse.nodered.org/u/joshinger)\
**Post date:** [8 July 2024 13:29 UTC](https://discourse.nodered.org/t/node-red-git-connection-commit-the-wrong-package-json/88674/3 "2024-07-08T13:29:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 July 2024 13:29 UTC](https://discourse.nodered.org/t/node-red-git-connection-commit-the-wrong-package-json/88674/4 "2024-07-22T13:29:49Z")

</div>

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