trailsjs / trails

:evergreen_tree: Modern Web Application Framework for Node.js.
http://trailsjs.io
Other
1.66k stars 70 forks source link

Unable to generate a Trails project with Yo #197

Closed KNTH01 closed 8 years ago

KNTH01 commented 8 years ago

Issue Description

Unable to generate a Trails project with Yo. I just install yo and generator-trails. Then, I execute this command yo trails. I enter my options and nothing happens after the module name option.

trails generator

Environment

KNTH01 commented 8 years ago

I just test with node v4.4.4 and npm v3.9.0 and this is still not working.

jaumard commented 8 years ago

Thanks ! I will take a look ! :) Currently Trails v1.0 is out but some Trailpacks are not compatible yet and need to be updated. I'll keep you updated ;)

jaumard commented 8 years ago

Don't know why under windows it freeze after module name if name already exist on npm repository. If it's not the process end without error after "Package keywords" but nothing was generated...

capture d écran 2016-05-16 a 17 37 14

Seems like the generator is not compatible with windows at all...

jaumard commented 8 years ago

Just some more tests, it appear to block on mac too with last yo (1.8.1). yo@1.7.0 works fine.

tjwebb commented 8 years ago

So this only happens after upgrading to yo 1.8.x?

jaumard commented 8 years ago

@tjwebb in windows the generator just not works... on mac after upgrading in 1.8 there some problems. That's why I update generator-node but can't publish it on npm (travis fails). I currently trying to make generator-node work on appveyor, maybe it will fix all windows problems also. But the current master should fix all mac problems

jaumard commented 8 years ago

@tjwebb ok now generator-node is green on windows ! https://github.com/trailsjs/generator-node can you take a look to deploy it on npm ? I will continue to look generator-trails once the new generator-node is deploy. Thanks

KNTH01 commented 8 years ago

Hi,

I just tried trails on my linux distribution. When I generated the app with yo trails and my directory and module name is trails, the generator script loops. Then, I try again with a different directory and module name trails-test, there is no problem.

Shall I open another issue for this ?

Anyway, I hope the problem on Windows will be fixed :D Many thanks.

jaumard commented 8 years ago

@KevinNTH no need another issue thanks ! I'm on it :D all should be fix with the next generator-node version for linux/mac, don't know for windows yet ^^ Keep you updated when the new version is out.

jaumard commented 8 years ago

@KevinNTH this is normally fix with generator-trails@1.0.0 can you test please ? I also made a test with it on mac and windows and it was successful ! :D Let us know :)

KNTH01 commented 8 years ago

@jaumard thanks for your contribution !

... but... :P

On Linux, node v6.1.0 :

│ Update available: 1.0.0 (current: 1.0.0-beta-7) │
│ Run npm update -g generator-trails to update.

I update my generator, then execute yo trails again.

And I still block at the module name option (which I enter default value trails).

jaumard commented 8 years ago

@KevinNTH ok thanks! I think this will be resolved by generator-node (I'm waiting the new version on npm) but v1.0.0 have now to work correctly now on windows (and mac/linux) (if the name is not already on npm or it will freeze). Can you confirm please ?

KNTH01 commented 8 years ago

@jaumard : Yes, I understand now "if the module name is already on npm it will freeze".

On linux, the generator works ! I am going to try on Windows later and keep update you !

KNTH01 commented 8 years ago

Ok, everything is fine on Windows 10, thanks a lot for the fix !!! I needed it :D

jaumard commented 8 years ago

@KevinNTH thanks for the confirmation ! :D great so now we just need new generator-node to fix the freeze and it will be perfect. Little up @tjwebb if you can take a look at travisCI for generator-node :)

jaumard commented 8 years ago

Thanks @tjwebb but now I have this problem when I try to npm install generator-node :

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "@trails/generator-node"
npm ERR! node v4.3.1
npm ERR! npm  v3.9.0
npm ERR! path /Users/jaumard/IdeaProjects/generator-trails/node_modules/.staging/lodash-51519aac
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/Users/jaumard/IdeaProjects/generator-trails/node_modules/.staging/lodash-51519aac' -> '/Users/jaumard/IdeaProjects/generator-trails/node_modules/@trails/generator-node/node_modules/generator-license/node_modules/lodash'
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/jaumard/IdeaProjects/generator-trails/node_modules/.staging/lodash-51519aac' -> '/Users/jaumard/IdeaProjects/generator-trails/node_modules/@trails/generator-node/node_modules/generator-license/node_modules/lodash'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jaumard/IdeaProjects/generator-trails/npm-debug.log

Any idea ?

jaumard commented 8 years ago

@tjwebb related to this issu https://github.com/npm/npm/issues/5082 possible fix : https://github.com/npm/npm/issues/5082#issuecomment-217996678 https://github.com/yeoman/yo/issues/437#issuecomment-219977426

jaumard commented 8 years ago

@tjwebb I try to deploy from node 4 or 5 but same result... Same error but for a different submodule...

jaumard commented 8 years ago

I deploy generator-trails@1.0.1 who use the working generator-node@1.0.14 for now until we figure how to deploy generator-node correctly on npm.

jaumard commented 8 years ago

@KevinNTH normally now generator shouldn't freeze anymore if package already exist :) can you confirm ?

KNTH01 commented 8 years ago

@jaumard : Yes I confirm ! Thanks et nice job !!!

jaumard commented 8 years ago

Can be close @tjwebb @konstantinzolotarev :)