Skip to content

Issue with project structure on iron create #100

Open

Description

@BrooklynC

To start, is iron-meter compatible with Windows?

Is the project directory and file structure listed in the readme still up-to-date? When I create a new project, my structure has several differences, including:

  • no bin directory
  • no app/client/collections directory
  • no app/client/lib directory
  • no packages, private or public directories
  • no server/collections or controllers or lib directories

There are other differences too but hopefully it's all one issue. Any thoughts? Thanks very much.

Activity

  1. scottmcpherson commented on Mar 7, 2015

    @scottmcpherson

    Hey @BrooklynC , I'm not sure if it's compatible with Windows, but I'd be interested in finding out. Have you tried using it with Windows?

    The readme needs to be updated to reflect the actual project structure that is generated. None of the files that you listed are currently being generated.

  2. cmather commented on Mar 7, 2015

    @cmather
    Contributor

    Or we should fix the project template to actually include those folders/files :). I'm not sure why bin isn't being generated. I see a "bin" folder in the project template folder but maybe it's not getting checked into github or deployed to npm because there's no 'gitkeep' file in it? I think that might be what's happening for the other folders too.

  3. BrooklynC commented on Mar 7, 2015

    @BrooklynC
    Author

    Scott, I had these issues when running in Windows (I don't own a Mac). Thought that might have been the reason for the missing folders.

    Chris, anything I should try on my end? I'm literally learning how to write code as I build my project so I can't get too creative, I've got very limited knowledge. But this folder structure could really help me out to understand where all the Meteor code goes. Thanks.

  4. cmather commented on Mar 9, 2015

    @cmather
    Contributor

    This should be fixed, if it was indeed the .gitkeep issue with folders. All of the folders mentioned above are created for me on the master branch. Can someone test.

    > git clone https://github.com/iron-meteor/iron-cli.git
    > cd iron-cli
    > npm install
    > npm link
    > cd ~/src/scrap
    > iron create my-project
    
  5. scottmcpherson commented on Mar 9, 2015

    @scottmcpherson

    Yep, they're all being created.

  6. BrooklynC commented on Mar 10, 2015

    @BrooklynC
    Author

    I'm still getting a short list of directories, although I may not have followed your instructions properly. I ran the commands you listed in Git Shell, but was unclear on "cd ~/src/scrap". That directory does not exist. Am I just changing to my top level directory?

    When I run iron create, it lists the directories and files but stops after the stylesheet and says "Installing the package iron-router" at that point.

  7. scottmcpherson commented on Mar 10, 2015

    @scottmcpherson

    > cd ~/src/scrap is just a location example that Chris is giving to install your app in. You can install your app wherever you like though. You might want to do something like > cd Desktop and then run > iron create my-project instead.

    I would try finding the location of where you have iron installed, and looking in package.json to check the version for 1.0.1, which is the latest.

  8. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    Thanks to both of you for your assistance and patience. Everything is up and running, looking forward to using it!

  9. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    Apologies, one more question - I created the project with "iron create my-project", then opened the project in WebStorm. When I try to add packages there, I get an error message saying I am not in a Meteor project directory and prompts me to create a project using "meteor create myapp".

    Do I need to create using iron? Or can I create using the "meteor create" command and migrate to an iron file structure? Or is this me just missing some setting in WebStorm?

    When I cd into a project directory that I created using "meteor create", the directory is followed by a line of text like [master +2 ~0 -0 !]. This does not appear for directories created using iron create. Is this relevant?

    Thanks again.

  10. scottmcpherson commented on Mar 11, 2015

    @scottmcpherson

    Hmm not familiar with WebStorm but are you trying to add packages using iron command or the meteor command. All of the meteor commands are mapped to iron. So if you're in the root of the project folder, you should be able to use > iron add some:package.

  11. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    Hi Scott, added this to my last comment while you were typing:

    When I cd into a project directory that I created using "meteor create", the directory is followed by a line of text like [master +2 ~0 -0 !]. This does not appear for directories created using iron create. Is this relevant?

    I typically add projects using the meteor command, but I don't see how I can apply the iron file structure that way. But when created using the iron command, they aren't recognized as meteor.

  12. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    I realize that line of text likely has to do with Git commits, was using Git shell, sorry to mix that up.

    But still curious about which direction to create projects from. Thanks again.

  13. scottmcpherson commented on Mar 11, 2015

    @scottmcpherson

    You should be able to use iron to create your project and then use iron commands in place meteor commands, unless WebStorm is somehow preventing that.

    meteor = iron
    meteor add my:package = iron add my:package
    etc..

  14. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    Thanks Scott, I was able to resolve by creating the project using "iron create", then taking the .meteor folder out of the app folder and moving it up a level into the project directory. Somehow, it wasn't being recognized where it was. Meteor commands now work, but iron commands do not:

    "iron add aldeed:autoform" results in following error:

    meteor add aldeed:autoform
    events.js:72
    throw er; // Unhandled 'error' event
    ^
    Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)

  15. scottmcpherson commented on Mar 11, 2015

    @scottmcpherson

    Does WebStorm have a built in console that your trying to run the commands from? What platform are you on?

    Iron won't work if you move meteor out of the app directory.

  16. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    WebStorm does have its own console for me to run command lines, but the same issues exist whether I use that or another shell (I was using Git Shell last night). I'm on Windows 8.

    To the note I added about the text showing up after the project directory ([master...]) when running in Git Shell, I'm assuming this is realated to Git, but it only appears for projects I have created using "meteor create", never for ones by "iron create". Those just aren't being recognized as Meteor projects.

  17. cmather commented on Mar 11, 2015

    @cmather
    Contributor

    Any chance you could take a screenshot of the error and the command that produces it?

    On Mar 11, 2015, at 7:14 AM, BrooklynC notifications@github.com wrote:

    WebStorm does have its own console for me to run command lines, but the same issues exist whether I use that or another shell (I was using Git Shell last night). I'm on Windows 8.

    To the note I added about the text showing up after the project directory ([master...]) when running in Git Shell, I'm assuming this is realated to Git, but it only appears for projects I have created using "meteor create", never for ones by "iron create". Those just aren't being recognized as Meteor projects.

    —
    Reply to this email directly or view it on GitHub.

  18. BrooklynC commented on Mar 11, 2015

    @BrooklynC
    Author

    Hey Chris, I'll do that tonight, thanks.

  19. BrooklynC commented on Mar 12, 2015

    @BrooklynC
    Author

    OK, I'm getting closer. It was unclear to me that the app directory IS the Meteor project, wrapped within the Iron project. I was under the impression that the Iron project and Meteor project were one and the same. Now I can open the Iron project in WebStorm and either:

    • run Iron commands (like iron g) while in the Iron directory (but not Meteor commands)
    • run cd app and run Meteor commands from there

    I can't run Iron commands while in the app directory to add collections or to run Meteor. Screenshots attached. I assume I'm fine as long as Meteor commands work, please let me know if I'm mistaken. Thanks for all your help.

    iron command error 1
    iron command error 2

  20. cmather commented on Mar 12, 2015

    @cmather
    Contributor

    Thanks for the screenshots. I think you correctly discovered how it works.

    But the screenshot illustrates a situation we should probably fix. I don't see any reason why you can't run the 'iron' command in any subdirectory. I think what's happening here is the default iron command is to run meteor run but it can't find the meteor app directory from the current directory. Looks like a bug.

    If anyone wants to take a crack at this the fix, it should be pretty straight forward. See these lines:

  21. cmather commented on Mar 20, 2015

    @cmather
    Contributor

    Hey @BrooklynC, Did this get resolved?

  22. added this to the Triage milestone on Mar 20, 2015
  23. BrooklynC commented on Mar 20, 2015

    @BrooklynC
    Author

    Hey Chris, thanks for checking in. It is resolved to the extent that I can work on and run the Meteor app as long as I am in the app directory. I still can't do anything if I am a level up. I saw your note asking if anyone wants to try to fix this, that's WAY beyond my abilities :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions