keithwhor/nodal

misleading poly:new

Closed this issue · 2 comments

Hi,

I tried to create a new project thanks to the poly:new command.

λ nodal poly:new refab
Creating project "refab"...
Project created successfully!
You have 950 Polybit Credits available.
Creating new database with alias "refab"...
Database created successfully!
You have 900 Polybit Credits available.
module.js:327
    throw err;
    ^

Error: Cannot find module 'D:\DEV\WORKSPACE\config\db.json'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\cli\commands\poly\db\create.js:58:18
    at C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\cli\commands\poly\credits.js:63:7
    at C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\node_modules\async\lib\async.js:726:13
    at C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\node_modules\async\lib\async.js:52:16
    at done (C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\node_modules\async\lib\async.js:246:17)
    at C:\Users\SylvainLap\AppData\Roaming\npm\node_modules\nodal\node_modules\async\lib\async.js:44:16

I think this is because I need to create a local nodal project first, before calling nodal poly:new. It's not really clear in the README, I thought that "poly:new" would also create the Nodal project locally.

Maybe you should specify that in the README ?

I can, yeah. I'll also make it throw an error if you do poly:new outside of a project space for now. :)

This should be fixed in the newest version of Nodal.