error: appears to be a git repo or submodule



  • 79 error git /home/localdev/NodeBB/node_modules/nodebb-theme-test: Appears to be a git repo or submodule.
    80 error git /home/localdev/NodeBB/node_modules/nodebb-theme-test
    81 error git Refusing to remove it. Update manually,
    81 error git or move it out of the way first.
    

    What does it mean and what do I do?


  • Admin

    What command did you type to get that? Usually that happens when you clone a dependant package, and it gets out of date, and then you run npm i


  • Plugin & Theme Dev

    @charles what do you have for "id" in plugin.json? for nodebb-theme-test



  • @psychobunny said:

    What command did you type to get that? Usually that happens when you clone a dependant package, and it gets out of date, and then you run npm i

    the command I used is npm install

    @pichalite said:

    @charles what do you have for "id" in plugin.json? for nodebb-theme-test

    id is nodebb-theme-test


  • Admin

    Can you post the whole plugin.json? That's weird, npm install really shouldn't be attempting to update your theme



  • @psychobunny

    {
    	"id": "nodebb-theme-test",
    	"library": "./lib/theme.js",
    	"hooks": [
    		{
    			"hook": "filter:widgets.getAreas", "method": "defineWidgetAreas", "callbacked": true
    		}
    	],
    	"scripts": [
    		"lib/client.js",
    		"../nodebb-theme-persona/lib/persona.js",
    		"../nodebb-theme-persona/lib/modules/nprogress.js",
    		"../nodebb-theme-persona/lib/modules/autohidingnavbar.min.js",
    		"../nodebb-theme-persona/lib/modules/slideout.min.js"
    	]
    }

  • Admin

    And you didn't modify the package.json in NodeBB either right? git status on the nbb root directory give you anything?

    If not, I'm stumped as to why this would happen. If it doesn't break anything though, it's definitely safe to ignore

    EDIT: use triple backticks for a code block

    `` `
    multiple lines of code ^ minus the space between the three ticks
    `` `
    


  • @psychobunny i will try again and report back the steps i took

    I also learned how to display code block!!! thanks!!


  • GNU/Linux

    Ok, I'm not quite sure why you guys were asking for the plugin.json but due to the command being npm install I'd rather like to see into the package.json of your module. NPM doesn't really do much with the plugin.json. Or am I missing something?
    EDIT: especially check the name property within your package.json

    PS @psychobunny:
    You can even use

    ````
    more than three backticks for safe usage of three backticks within code blocks ;-)
    ````
    


  • @frissdiegurke

    {
      "name": "nodebb-theme-test",
      "version": "0.0.1",
      "description": "testing",
      "main": "theme.less",
      "keywords": [
    
      ],
      "license": "MIT"
    }
    

    Not sure if the above will help but that is from package.json


  • GNU/Linux

    I don't see any problems there thought. Except for the bad value for main, it is supposed to be a javascript file; But since other NodeBB themes share this bad value it should not break anything. o_O

    After a quick search with the search engine of my choice I've found this stackoverflow question with a similar issue. There doesn't seem to be a solution but moving your repo out of node_modules and either symlink (by hand; as the answer describes) or npm link it.


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.