graphlab-fr / cosma

Cosma is a document graph visualization tool. It modelizes interlinked Markdown files and renders them as an interactive network in a web interface.
https://cosma.arthurperret.fr
GNU General Public License v3.0
125 stars 4 forks source link

[Bug] The config file cannot be save. #41

Closed mcaruel closed 1 year ago

mcaruel commented 1 year ago

Actions leading to the bug

I followed the following instruction from the user manual

  1. install cosma
  2. create a directory test
  3. create two subdirectories : data and export
  4. run cosma config within the test directory

Bug description

I get this message from the terminal:

/usr/local/lib/node_modules/@graphlab-fr/cosma/core/models/config.js:421
      throw new ErrorConfig('The config file cannot be save.');
      ^

Error Config: The config file cannot be save.
    at Config.save (/usr/local/lib/node_modules/@graphlab-fr/cosma/core/models/config.js:421:13)
    at module.exports (/usr/local/lib/node_modules/@graphlab-fr/cosma/controllers/config.js:10:90)
    at Command.<anonymous> (/usr/local/lib/node_modules/@graphlab-fr/cosma/app.js:56:40)
    at Command.listener [as _actionHandler] (/usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:488:17)
    at /usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:1227:65
    at Command._chainOrCall (/usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:1144:12)
    at Command._parseCommand (/usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:1227:27)
    at Command._dispatchSubcommand (/usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:1050:25)
    at Command._parseCommand (/usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:1193:19)
    at Command.parse (/usr/local/lib/node_modules/@graphlab-fr/cosma/node_modules/commander/lib/command.js:897:10)

Node.js v18.16.0

What version of Cosma are you using?

CLI 2.0-beta-1

What is your operating system?

What version of the operating system are you on?

13.4.1 (22F82)

Additional information

No response

mcaruel commented 1 year ago

Actually the file is created if using sudo cosma config. This is a bit strange since I have write credential for the directory cosma-test

infologie commented 1 year ago

@mcaruel Could you try updating to 2.0.0 and tell us if the problem persists?

mcaruel commented 1 year ago

I was already on 2.0.0. I solved the problem by changing the permission setting of my directory. I already had "read and write" permission but I somehow had to apply this permission to enclosed items of the directory. Note that everything was OK when executing cosma config with sudo. Maybe the problem cam from my permissions. Now it works !

infologie commented 1 year ago

Great!