mglaman / conductor

A Composer user interface built using Electron.
MIT License
142 stars 12 forks source link

Composer install on Linux doesn't do install #21

Closed mglaman closed 8 years ago

uberhacker commented 8 years ago

I can confirm that a composer install fails using the npm method. See below: System specs:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial
Composer version 1.2.1 2016-09-12 11:27:19
npm version: 3.10.8
node version: v6.9.1

Debug output:

> conductor@0.1.3 start /home/ed/conductor
> electron .

Gtk-Message: Failed to load module "overlay-scrollbar"
App threw an error during load
Error: Cannot find module '/home/ed/.config/conductor/projects.json'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (/home/ed/conductor/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at ProjectList.refreshList (/home/ed/conductor/utils/ProjectList.js:17:16)
    at new ProjectList (/home/ed/conductor/utils/ProjectList.js:30:7)
    at Object.<anonymous> (/home/ed/conductor/main.js:11:19)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '/home/ed/.config/conductor/projects.json'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (/home/ed/conductor/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at ProjectList.refreshList (/home/ed/conductor/utils/ProjectList.js:17:16)
    at new ProjectList (/home/ed/conductor/utils/ProjectList.js:30:7)
    at Object.<anonymous> (/home/ed/conductor/main.js:11:19)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
uberhacker commented 8 years ago

@mglaman: I'm thinking the issue here is where conductor thinks projects.json should be installed. Not sure if you have ever heard of the XDG Base Directory Specification, but it will create the ~/.config directory to store stuff if the OS supports it. See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html.

mglaman commented 8 years ago

Yeah. Apparently creating and saving a settings JSON file is becoming a bigger grief than I imagined. It lives here: https://github.com/mglaman/conductor/blob/master/utils/ProjectList.js.

It's supposed to make the directory and save an empty file.

mglaman commented 8 years ago

Fixed up in @452e573d0080b3028035efb0241cdb9343a589a5.