Issue creating a project in node red

I need some help in creating a project on node red. I am using the node red add on on hassio and was using a project by the name "raspi_x15_nodered" earlier. I migrated to another pi at which point I lost the ssh keys and so could not restore the project. I anyway had the flow files with me so I went ahead and created my flows afresh. Now the issue is that I am not able to create a new project in node red. When I enable the projects feature in the settings file I get a permanent error message on my flow screen as "Project raspi_x15_nodered not found". The error message does not go away. When I try to create a new project I get this exception in the logs and it fails.

Error: Cannot migrate as there is an active project
    at Object.createProject (/opt/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js:369:19)
    at Object.createProject (/opt/node_modules/@node-red/runtime/lib/api/projects.js:66:41)
    at /opt/node_modules/@node-red/editor-api/lib/editor/projects.js:108:33
    at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5)
    at next (/opt/node_modules/express/lib/router/route.js:137:13)
    at /opt/node_modules/@node-red/editor-api/lib/auth/index.js:74:13
    at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5)
    at next (/opt/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/opt/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5)

The issue is that I have looked at my directory /usr/share/hassio/homeassistant/node-red/projects and it is empty. I searched my whole pi but I cant find any file with the name raspi_x15_nodered and so I am not sure where is node red picking this file from. Can somebody help me on this please.

OS: Hassio
Node red version : 5.0.6

Hi @vks007

That is the Hassio plugin version, not the Node-RED version. You can check the NR version from the log output.

I'm not entirely sure on how you've managed to get into this state. You say you 'migrated to another Pi' - what exactly does that mean?

The log output will also log the user directory it is using. In that directory you'll have a file called .config.json. Edit that file and search for the activeProject entry - then either change it to a project that does exist, or delete it entirely.

Thanks for the suggestion. I removed the entries and it works good now.
Frankly I also don't remember how did I get into this state. I did not edit anything manually though.
Anyway, good now ! Thanks again.

Hello Nick,

Thank you for this response. It was helpful for me too. Thank you very much.

@vks007 Vijay thank you for asking this issue. It was a quick input for me.

Regards,
Shiddu