scottmcpherson / meteor-io

A Command-line Tool for Meteor to Create Custom Commands, Generators, and Scaffolding
59 stars 5 forks source link

if (self.isDir(ioDest)) always returns false #6

Closed StanLindsey closed 8 years ago

StanLindsey commented 9 years ago

o/

Looks like the isDir method is always returning false and triggering the 'not valid directory error':

Directory: test
/usr/local/lib/node_modules/meteor-io/lib/commands/setup.js:93
    throw new Error('Not a valid directory');

I replaced "if (self.isDir(ioDest))" with "if (ioDest)" and it creates the directory fine. Though obviously there is no validation.

I still appear to get errors down the line. When attempting to create a project etc. I have updated Node to v5.

scottmcpherson commented 9 years ago

Hey @SlappyBag, can you try upgrading meteor-io to the latest. You'll probably have to respecify the directory for io, but it should be good to go after that.

StanLindsey commented 9 years ago

No luck for me.


└── meteor-io@1.0.2
$ io create testIOProject

First we need to set up an io directory.

Specify a directory where you would like to store your generators, templates, and config.

Directory: io
/usr/local/lib/node_modules/meteor-io/lib/commands/setup.js:92
      throw new Error('Not a valid directory');
      ^

Error: Not a valid directory
    at Setup.run (/usr/local/lib/node_modules/meteor-io/lib/commands/setup.js:92:13)
    at Command.run (/usr/local/lib/node_modules/meteor-io/lib/command.js:31:34)
    at Object.<anonymous> (/usr/local/lib/node_modules/meteor-io/bin/io:7:13)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:136:18)
    at node.js:972:3

Also tired ~/io and ~/

scottmcpherson commented 9 years ago

It'll create an /io folder for you @SlappyBag.

When it ask you to specify a directory, maybe try dragging a folder onto that line in the terminal and dropping it.

StanLindsey commented 8 years ago

I get it.

It has to be a directory already created. io won't generate the full folder path for you, which seems as if a bug in itself.