Closed Jonathan-Zollinger closed 6 months ago
@Jonathan-Zollinger Thanks for opening an issue. I can reproduce the bug on macOS. I also have the following bugs:
cosma --help
without having created a user data directory produces a similar warning:Warn. No default or local config file to use. Cosma runs with factory config. Use "cosma config --help" for more info about create config file.
cosma --create-user-data-dir
should produce a message about the directory being already there, but instead I get an error message that is similar to yours:node:internal/modules/cjs/loader:1093
throw err;
^
Error: Cannot find module '../models/config-cli'
Require stack:
- /opt/homebrew/lib/node_modules/@graphlab-fr/cosma/controllers/user-data-dir.js
- /opt/homebrew/lib/node_modules/@graphlab-fr/cosma/app.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
at Module._load (node:internal/modules/cjs/loader:934:27)
at Module.require (node:internal/modules/cjs/loader:1157:19)
at require (node:internal/modules/helpers:119:18)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/@graphlab-fr/cosma/controllers/user-data-dir.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Module.require (node:internal/modules/cjs/loader:1157:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/homebrew/lib/node_modules/@graphlab-fr/cosma/controllers/user-data-dir.js',
'/opt/homebrew/lib/node_modules/@graphlab-fr/cosma/app.js'
]
}
Node.js v19.8.1
Pinging @Myllaume. I think this is an issue with detecting the absence/presence of the defaults file.
Until the bug is fixed, follow these steps:
$HOME/.config/cosma-cli
or $HOME/.local/share/cosma-cli
. On macOS, ~/Library/Application Support/cosma-cli
.defaults.yml
configuration file manually to your user data directory. It can be empty.This does not fix the error with cosma --create-user-data-dir
but it makes the warning about default config go away.
What version of Cosma are you using?
2.4.0
On which operating system(s) did you observe the bug?
What version of the operating system are you on?
Windows 11 Home (22H2 22621.3007) & Fedora 39 workstation
Actions leading to the bug
cosma --create-user-data-dir
Bug description
attempting to create a user data directory produces this error and fails to produce the directory needed.
Additional information
I've replicated this issue on both a fedora machine and a windows machine.
I've added software versions between the two setups below.