AmpersandJS / ampersand

Quickest way to get started with ampersand.
MIT License
812 stars 41 forks source link

`ampersand` hangs after author name prompt #112

Closed zeke closed 9 years ago

zeke commented 9 years ago

I made it this far:

» ampersand
ampersand.js - app generator

This will make a new directory for your app in:
/Users/z/Desktop

? What do you want to call the folder? ampy
? What is the human friendly title of your app? Ampy
? Do you want to use hapi or express as a server framework? hapi
? What's your name? Used to populate "author" field of "package.json", as:

{
  "name": "app",
  "version": "0.0.1",
  "author": "Your answer",
  "dependencies": ...
}

Author Name: Zeke

^ The process hangs here, then my fans start spinning.

» which node
/Users/z/.nvm/versions/io.js/v1.5.1/bin/node
zeke commented 9 years ago

I just went through the same process on node 0.10.35, and it worked like a charm.

This may be a duplicate of https://github.com/AmpersandJS/ampersand/issues/105

fyockm commented 9 years ago

@zeke I can confirm that the process hangs with iojs-v1.5.1 and iojs-v1.6.2. However, it seems to work fine with node v0.10.38 and v0.12.1. Not sure what the problem is, but I don't think it's related to #105.

For now, I would recommend just using a version of node instead of iojs.

fyockm commented 9 years ago

@zeke Re-reading #105, I realized that the issue described by @therebelrobot is actually the same as you mention here. However, the purpose of that issue was different, which is why I claimed them unrelated. Sorry for the confusion.

zeke commented 9 years ago

No worries. Feel free to close if this is indeed a dupe..

nini-os commented 9 years ago

+1

same problem here with MacOSX with iojs and yosemite.

generation stuck after Author Name.

fyockm commented 9 years ago

Even with the fix for #105, there still seems to be a problem with iojs. I've tested successfully on node@12.2. Need to dig a little deeper.

hermwong commented 9 years ago

This is happening for me using:

node -v
v1.8.1

and also with:

iojs -v
v1.8.1

I'm using OSX Yosemite.

DimitryDushkin commented 9 years ago

Same on iojs 2.5.0

agentS commented 9 years ago

Same with iojs 2.3.4 and node 4 on a 64 bit Linux OS.

HenrikJoreteg commented 9 years ago

The issue seems to be with the ncp module, which appears to have issues in node 4. The callback never gets called after this call: https://github.com/AmpersandJS/ampersand/blob/master/lib/app/generateApp.js#L38 that copies the template directory.

There's an alternative module that does the same called CPR: https://github.com/davglass/cpr that would probably work but lacks the transform option so the transform would have to be done separately.

HenrikJoreteg commented 9 years ago

this may be a better alternative, i've used this module in the past: https://www.npmjs.com/package/fs-extra#copy and it sees quite a bit of use.

fyockm commented 9 years ago

Thanks for doing the legwork @HenrikJoreteg! I like your solution because fs-extra is already being used in this module. I'll submit a PR for review shortly.