thinkt4nk / frisk

A simple, beautiful project status application built on Node.js and Express
1 stars 0 forks source link

Migrations can't find configuration path. #1

Open bermi opened 11 years ago

bermi commented 11 years ago

I've been trying to setup Frisk locally to give it a try and wrote some docs on the README.md file https://github.com/bermi/frisk/commit/bdb6eaa193bf3e5b71267e9e482dd6cde65fe026 to outline the steps I've been following but it looks like the paths are not being properly resolved or that I'm missing a config/index.js file.

    /frisk ±master:
    → migrate up

    module.js:340
        throw err;
              ^
    Error: Cannot find module '/Users/bermi/tmp/frisk/migrations/../config/'
        at Function.Module._resolveFilename (module.js:338:15)
        at Function.Module._load (module.js:280:25)
        at Module.require (module.js:362:17)
        at require (module.js:378:17)
        at Object.<anonymous> (/Users/bermi/tmp/frisk/migrations/001.js:4:13)
        at Module._compile (module.js:449:26)
        at Object.Module._extensions..js (module.js:467:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:362:17)

By looking at the code on migrations/001.js it looks like you should be using path.normalize() to resolve directory names.

Am I missing some steps?

thinkt4nk commented 11 years ago

Bermi,

The migrations join the config path and the environment, so you need to have a config whose name matches the NODE_ENV. There's a development.js config provided in the config directory, so you can use that if your mysql username and password are both "root" and the database is called "boards". In this case, you would migrate up with the following...

NODE_ENV=development migrate up

I did, however, just push a commit to remove and ignore the node-migrate state file from the project. You'll need to pull changes if you want to be able to apply the migrations.

At the present time, the only functionality that's possible in the UI is the creation, deletion, and sorting of task states. I haven't yet finished the implementation of the task creation and sorting within the various states.