coreybutler / fenix

A simple and visual static web server with collaboration features.
https://preview.fenixwebserver.com
GNU General Public License v3.0
1.65k stars 135 forks source link

CLI, cannot find module... #113

Closed Acidham closed 4 years ago

Acidham commented 4 years ago

Fenix v3.0.0-rc.13 throws following error when using e.g. fenix start or fenix list

Error: Cannot find module '/Users/<user>/Library/Application Support/Fenix/data/preferences.json'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (/Applications/Fenix.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Applications/Fenix.app/Contents/Resources/app.asar/main/modules/cli/CLI.js:105:13)
    at Object.<anonymous> (/Applications/Fenix.app/Contents/Resources/app.asar/main/modules/cli/CLI.js:936:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
coreybutler commented 4 years ago

Thanks for reporting.

Just to confirm, did you install this with the pkg installer? Also, did you launch Fenix through the UI at least once?

Acidham commented 4 years ago

Yep installed via pkg installer and started through UI

coreybutler commented 4 years ago

In the output you specified, was that the exact output or was <user> your actual username, masked for privacy purposes? If that is the raw output, then the command line tool is not generating the username properly.

I do think this is a path issue with the CLI, especially since that path doesn't look right anyway, regardless of username.

Acidham commented 4 years ago

Yes I marked it. Before the user name was set correctly.

I removed Fenix and reinstalled and now everything is working. It may happen that there was a conflict with the Fenix 2 version which was not removed/migrated with pkg installer.

coreybutler commented 4 years ago

Ah, interesting. When Fenix 3 launches, it looks for a Fenix 2 installation and is supposed to prompt for a migration, but that happens after the package installer is complete. It sounds like you were probably running into a conflict with the fenix-cli module.

I'm glad you got it working and apologize for the troubles.

For anyone reading this later, there is a migration wizard at http://migrate.fenixwebserver.com that may help existing Fenix 2 users with the transition.