ericmdantas / generator-ng-fullstack

Client, server or fullstack - it's up to you. ng-fullstack gives you the best of the latest.
MIT License
704 stars 103 forks source link

The new generator-ng-fullstack seems to be broken. Asking for XCode #40

Closed mcaudy closed 9 years ago

mcaudy commented 9 years ago

This project looks really great, and I am now using it instead of DaftMonks angular-fullstack.

I installed an earlier version of generator-ng-fullstack that I downloaded on 04-16-2015 and everything ran perfectly and I got the expected ToDo app

I saw that you updated the generator-ng-fullstack-master a few days ago with new features and I donwloaded it again today: 06-04-2015.

I updated generator by again running: npm install -g generator-ng-fullstack That seemed to intall OK.

But when I again ran: yo ng-fullstack I got both a popup error (screenshot attached) and the following error detail messsage in the terminal

"Additional error details: xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools."

(https://cloud.githubusercontent.com/assets/41196/7980254/00d3a346-0a74-11e5-8817-ad3d36e5c3fc.png)

Please advise. I have zip files for both of the generator versions, if that is helpful:

generator-ng-fullstack_04-16-2015.zip generator-ng-fullstack_06-04-2015.zip

Thanks again for your work on this great project!!

remicastaing commented 9 years ago

I remember something similar. I think I solved it by starting and updating XCode.

ericmdantas commented 9 years ago

Hello, @mcaudy and thanks for the feedback!

Does the generator finish installing? Because if that's an error with node-gyp, as I think it is (from the protractor dependency), it should work just fine.

mcaudy commented 9 years ago

Quick reply. More later

@ericmdantas Are you doing this development on a Mac or on Linux? I recently upgraded to Yosemite (OS 10.10..3) and that may be causing all or part of the current problem, but see NOTE 1 below.

It am not sure whether the generator finished installing or not, because I had already installed the 4-16-2015 version of generator-ng-fullstack, which I think would have been overwritten. We can probably figure this out by looking at the dates of the various files, but I don't have time to do that right now.

One other error that I saw as the terminal ran which I did not mention - which I also never saw before - is a messge that the bower components were being "cached but not saved". I think this probably means that the generator did finish properly.

@remicastaing Thanks for your suggestion. I do not have XCode installed, and for reasons I will explain later I do not want to install it. I have gcc and other Unix tools installed manually.

NOTE 1: the successful install and ToDo app creation that I did earlier with the generator-ng-fullstack that I downloaded on 04-16-2015 was also on the same computer running the same OS 10.10..3 system. I did not get the "XCode error" then.

NOTE 2: I have done a lot of NodeJS / AngularJS development over the past year and I have never seen any kind of "XCode error", nor have I seen it with any of the previoius LAMP development that I have done.

ericmdantas commented 9 years ago

Developing on Windows, for now.

As for the error, could you please try to install protractor locally in an empty folder? Just to see if it's really what I'm thinking it is.

mcaudy commented 9 years ago

@ericmdantas I will do the protractor test later, but I want to do some additional tests on my system first.

@remicastaing what version of OS X are you running? Have you actually tried the latest version of the generator-ng-fullstack?

mcaudy commented 9 years ago

@ericmdantas I discovered that the working generator-ng-fullstack that I downloaded on 04-16-2015 is about 50 times bigger (47.9 MB vs 700 KB) than the generator-ng-fullstack-master that I downloaded and tried to use yesterday, 06-04-2015.

I also tried downloading today the git clone version, and got about the same, much smaller, file size

generator-ng-fullstack_04-16-2015 47.9 MB this is the working generator generator-ng-fullstack-master-06-04-2015 700 KB (KB, not MB) this is the broken generator generator-ng-fullstack-git_06-05-2015 1900 KB (KB, not MB) this is a git version

I also made zip files of each of these to get a second comparison of the files sizes, and got the corresponding results for the smaller zip files

generator-ng-fullstack_04-16-2015.zip 11.2 MB this is the working generator generator-ng-fullstack-master-06-04-2015.zip 118 KB (KB, not MB) this is the broken generator generator-ng-fullstack-git_06-05-2015.zip 482 KB (KB, not MB) this is a git version

I think there is something fundamentally wrong with the newer version that you have on github

Please confirm directly that the new version of the generator actually works.

I do not see any point in my testing the new version further until we have clarified this.

Here is a link to my Public Dropbox with the zip file for the earlier 04-16-2015 version, in case you want to test and compare it with the new version.

https://dl.dropboxusercontent.com/u/8056789/generator-ng-fullstack_04-16-2015.zip

I will be happy to do more testing once I have something I know should work.

Thanks again for your great work on this project

remicastaing commented 9 years ago

I have the latest version of Mac OS. I didn't test the latest version of the generator. As I said, your issue remembers me one of mine a few month ago.

ericmdantas commented 9 years ago

I'm trying to simulate the error, but no luck. Just when I run:

$ yo ng-fullstack

I keep getting:

Cannot find module 'concat-map'

Says it doesn't find it here:

C:\Users\myself\AppData\Roaming\npm\node_modules\generator-ng-fullstack\
node_modules\yeoman-generator\
node_modules\download\
node_modules\vinyl-fs\
node_modules\glob-stream\
node_modules\minimatch\
node_modules\brace-expansion\index.js

But the file is where it's supposed to be... I'll see if I can make any progress later today, when I get home.

mcaudy commented 9 years ago

@remicastaing Since you and I are running the same system - Yosemite 10.0.3 - but you have not tested the latest version of the generator, I would like to suggest that you try the following.

Create a zip file of the generator-ng-fullstack that was globally installed in your /usr/local/lib/node_modules/ directory and name and date it, something like:
generator-ng-fullstack_06-05-2015-A.zip

This will save and protect your current version.

Then delete the original generator-ng-fullstack directory so that you create an entirely new install, rather than trying to overwrite the previous directory.

Then do the global install again: npm install -g generator-ng-fullstack

If you get an install with no errors that will be very informative.

If your generator install work, try creating a new app: yo ng-fullstack

If everything works, then the problem is on my end.

If the above two install do not work for you, then there is a problem with the new generator.

You can get back to your original version by unzipping the saved generator.

mcaudy commented 9 years ago

@ericmdantas the problem you are having with Yo not recognizing some of your files is similar to problems I had last year, when I first started using yo.

I found the solution in a comment on the internets: On Mac / Linux, NPM installs an invisible ".npm/" directory in your home directory:
on my mac: Users/mcaudy/.npm/ where 'mcaudy' is my username.

To get Yo (and NPM) working properly, you have to have to be the owner of this invisible .npm directory to be set your your username, so that you have unlimited access to this directory during installations.

You also have to make the same change for the directories where NPM global installations are installed. On Mac this is /usr/local/lib/node_modules/

This also solves the Mac problem of having to use 'sudo' with 'npm install' commands.

The way to change the user for these 3 directories on Mac is to run:

1). sudo chown -R whoami ~/.npm

2). sudo chown -R whoami /usr/local/lib/node_modules

3). sudo chown -R whoami /usr/local

'whoami' on mac/linux automatically inserts your user name. You can run the same commands by adding your own user name manually, eg for me: sudo chown -R mcaudy ~/.npm

Note: the tilde " ~ " on Mac / Linux is an alias to the current users home directory. Not sure if this is true on Windows.

Once I ran those three commands, Yo started working properly, and I no longer had to use sudo with 'npm install' commands.

My quality of life as a NodyJS developer improved greatly after doing this. ;)

I am not sure what the corresponding commands are on Windows, but you may know or you can find out

Hope this helps

mcaudy commented 9 years ago

Note: this comment system deleted the single quotes on the 'whoami' in the above three commands for some reason. Those quotes may be necessary for the commands to work properly

ericmdantas commented 9 years ago

Alright, bad news everyone.

I just unlinked the generator from my computer, uninstalled it, and reinstalled it again and I've got no errors (other than protractor's dependency of node-gyp that depends on other stuff that I don't have).

So I'd say two things could help us to track the bug:

ericmdantas commented 9 years ago

Also, @mcaudy thanks for the tips. If I don't get it to work when I'm at my company computer, I'll give your tips a try.

remicastaing commented 9 years ago

I installed the latest version and after gulp it, I got:

/.../ng-fullstack/client/dev/bower_components/bootstrap/dist/css/bootstrap.min.css not found!

But it should be a no brainer to fix.

remicastaing commented 9 years ago

I forgot to bower install.

Now, with gulp, it starts but I'm getting nothing on my browser over port 3000.

ericmdantas commented 9 years ago

Could you please run gulp build_temp and then npm start?

ericmdantas commented 9 years ago

I might have switched some tasks, that's why you have nothing on your browser.

remicastaing commented 9 years ago

Better, but with some errors in the browser now: capture d ecran 2015-06-06 16 20 39

ericmdantas commented 9 years ago

That's weird. It didn't happen here.

Could you try gulp and then npm start?

mcaudy commented 9 years ago

@ericmdantas I have had some success using Ubuntu after I had repeated problems installing XCode on Yosemite OS 10.10.3, and then could still not get the yo ng-fullstack to run although the new generator-ng-fullstack seemed to install properly.

Given my recent problems with Yosemite, and my repeated, years-long frustation with XCode, I decided to switch back to Ubuntu.

I am going to send a set of three separate messages which together show that

1) Protractor is installing properly on Ubuntu 14,

2) generator-ng-fullstack is installing properly on Ubuntu 14,

3) However running "yo ng-fullstack" stlll fails completely, apparently due to minor syntx errors in the generator.

Hopefully we can get the generator working fully soon.

Very excited!!

mcaudy commented 9 years ago

Successful npm install -g protractor on Ubuntu 14

mcaudy@MEAN-Ubuntu-14:~$ npm install -g protractor |

utf-8-validate@1.1.0 install /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate node-gyp rebuild

make: Entering directory /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build' CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build'

bufferutil@1.1.0 install /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil node-gyp rebuild

make: Entering directory /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node make: Leaving directory/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build' /usr/local/bin/protractor -> /usr/local/lib/node_modules/protractor/bin/protractor /usr/local/bin/webdriver-manager -> /usr/local/lib/node_modules/protractor/bin/webdriver-manager protractor@2.1.0 /usr/local/lib/node_modules/protractor ├── jasminewd@1.1.0 ├── jasminewd2@0.0.5 ├── saucelabs@0.1.1 ├── html-entities@1.1.2 ├── q@1.0.0 ├── minijasminenode@1.1.1 ├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10) ├── adm-zip@0.4.4 ├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0) ├── jasmine@2.3.1 (exit@0.1.2, jasmine-core@2.3.4) ├── source-map-support@0.2.10 (source-map@0.1.32) ├── accessibility-developer-tools@2.6.0 ├── request@2.36.0 (aws-sign2@0.5.0, forever-agent@0.5.2, qs@0.6.6, oauth-sign@0.3.0, tunnel-agent@0.4.0, json-stringify-safe@5.0.1, mime@1.2.11, node-uuid@1.4.3, form-data@0.1.4, http-signature@0.10.1, tough-cookie@1.2.0, hawk@1.0.0) ├── lodash@2.4.2 └── selenium-webdriver@2.45.1 (tmp@0.0.24, rimraf@2.4.0, xml2js@0.4.4, ws@0.7.2)

mcaudy@MEAN-Ubuntu-14:~$ ls /usr/local/lib/node_modules/ bower grunt-cli http-server npm protractor yo mcaudy@MEAN-Ubuntu-14:~$

mcaudy commented 9 years ago

Successful npm install -g generator-ng-fullstack on Ubuntu 14 !!

mcaudy@MEAN-Ubuntu-14:~$ npm install -g generator-ng-fullstack npm WARN optional dep failed, continuing fsevents@0.3.6 generator-ng-fullstack@1.3.3 /usr/local/lib/node_modules/generator-ng-fullstack ├── gulp-rename@1.2.2 ├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0) ├── yosay@0.3.0 (ansi-styles@1.1.0, ansi-regex@0.2.1, string-length@0.1.2, pad-component@0.0.1, word-wrap@0.1.3, strip-ansi@0.2.2, minimist@0.2.0, chalk@0.4.0, taketalk@0.1.1) ├── gulp@3.9.0 (pretty-hrtime@1.0.0, interpret@0.6.2, deprecated@0.0.1, archy@1.0.0, tildify@1.0.0, minimist@1.1.1, v8flags@2.0.5, semver@4.3.6, orchestrator@0.3.7, chalk@1.0.0, gulp-util@3.0.5, liftoff@2.1.0, vinyl-fs@0.3.13) ├── gulp-babel@5.1.0 (object-assign@2.1.1, replace-ext@0.0.1, through2@0.6.5, vinyl-sourcemaps-apply@0.1.4, gulp-util@3.0.5, babel-core@5.5.4) ├── yeoman-generator@0.18.10 (read-chunk@1.0.1, detect-conflict@1.0.0, dargs@3.0.1, yeoman-welcome@1.0.1, xdg-basedir@1.0.1, rimraf@2.4.0, class-extend@0.1.1, diff@1.4.0, text-table@0.2.0, user-home@1.1.1, mime@1.3.4, underscore.string@2.4.0, async@0.9.2, istextorbinary@1.0.2, cross-spawn@0.2.9, debug@2.2.0, nopt@3.0.2, yeoman-assert@1.0.0, shelljs@0.3.0, chalk@1.0.0, run-async@0.1.0, cli-table@0.3.1, mkdirp@0.5.1, pretty-bytes@1.0.4, through2@0.6.5, dateformat@1.0.11, glob@4.5.3, lodash@2.4.2, file-utils@0.2.2, github-username@1.1.1, sinon@1.14.1, findup-sync@0.2.1, gruntfile-editor@0.2.0, download@3.3.0, cheerio@0.18.0, yeoman-environment@1.2.5, mem-fs-editor@1.2.3, inquirer@0.8.5) └── babel@5.5.4 (slash@1.0.0, path-is-absolute@1.0.0, fs-readdir-recursive@0.1.2, convert-source-map@1.1.1, commander@2.8.1, output-file-sync@1.1.1, glob@5.0.10, source-map@0.4.2, chokidar@1.0.3, lodash@3.9.3, babel-core@5.5.4) mcaudy@MEAN-Ubuntu-14:~$ ls /usr/local/lib/node_modules/ bower generator-ng-fullstack grunt-cli http-server npm protractor yo mcaudy@MEAN-Ubuntu-14:~$

mcaudy commented 9 years ago

yo ng-fullstack errors on Unbuntu 14 after generator-ng-fullstack_06-07-2015 install

I already showed that the v2 generator generator-ng-fullstack_06-07-2015 was successfully installed on Ubuntu 14

But there still seems to be a simple syntax error in the generator that is creating yo ng-fullstack errors and blocking app creation

mcaudy@MEAN-Ubuntu-14:~/apps$ yo ng-fullstack [?] ========================================================================== We're constantly looking for ways to make yo better! May we anonymously report usage statistics to improve the tool over time? More info: https://github.com/yeoman/insight & http://yeoman.io ==========================================================================: Yes

/usr/local/lib/node_modules/generator-ng-fullstack/app/index.js:3 const yeoman = require('yeoman-generator'); ^^^^^ SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object._storeAsPath.Object.defineProperty.get as ng-fullstack:app at Store.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/store.js:62:35) at Environment.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/index.js:212:16) at Environment.create (/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/index.js:233:24) mcaudy@MEAN-Ubuntu-14:~/apps$ ls /usr/local/lib/node_modules/ bower generator-ng-fullstack grunt-cli http-server npm protractor yo mcaudy@MEAN-Ubuntu-14:~/apps$

ericmdantas commented 9 years ago

I guess that's because you're using node instead of io.js?

But hey, at least we're making progress :smile:

mcaudy commented 9 years ago

Possibly because of node instead of io.js.

I don't want to get into a lengthy node vs io.js discussion here. I have researched that topic carefully and I have seen clear statements that Node and io.js are planning eventually to merge again.

However, there are many other possible explanations:

Ubuntu 14 is widely used in the Open Source community - I would guess probably more than any other OS - and the various node modules that are created on that system tend to "interoperate" with each other without conflicts.

For the same reason, I think that io.js will generally work much better on Ubuntu 14.

This does not mean that everyone will have to drop Mac and Windows completely. You can use what ever IDE / OS you want that can access the Ubuntu running in the cloud via FTP, and also keep a local copy of everything for when you are offline.

I have to stop now. I hope you can find the remaining errors in the generator soon. I will be happy to help with that later, too.

ericmdantas commented 9 years ago

I'd love some help, that's for sure.

As for the node vs io.js, I'm really tempted to make a server for node too. Since we're using babel/typescript, it's not that hard. I don't really know how they're merging io.js with node, and when that's happening. So, I might have a server for node.

The main changes I can think of:

I'll push a new server today and might have the release of 1.4 soon enough. Just checking some stuff and seeing if I'm missing something.

Also, I'm planning on a refactor - things are growing a bit out of control and they're doing stuff they're not supposed to. So I'm going to create a few helper classes and factories to deal with copying files left and right and this kind of thing.

TsumiNa commented 9 years ago

/home/k-asuka/local/lib/node_modules/generator-ng-fullstack/app/index.js:3 const yeoman = require('yeoman-generator'); ^^^^^ SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.defineProperty.get as ng-fullstack:app at Store.get (/home/k-asuka/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:64:35) at Environment.get (/home/k-asuka/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:228:16)

Also got these errors because of 'const' keyword is not available in ES5 :(

ericmdantas commented 9 years ago

Hello, @kidddddd1984!

I made it possible to use it with node with the release 1.3.4-0. Could you please give it a try?

TsumiNa commented 9 years ago

yo ng-fullstack module.js:338 throw err; ^ Error: Cannot find module 'yeoman-generator' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/Users/liuchang/.nvm/versions/node/v0.12.4/lib/node_modules/generator-ng-fullstack/app/index.js:3:14) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17)

@ericmdantas

I tried the new one with nodejs 0.12.4 installed with nvm and got these. seems there are some small mistakes :)

ericmdantas commented 9 years ago

@kidddddd1984, just tried it in a different computer and it worked just fine.

Could you please try the following:

TsumiNa commented 9 years ago

Yes it worked! 2015年6月10日 下午7:46于 "Eric Mendes Dantas" notifications@github.com写道:

@kidddddd1984 https://github.com/kidddddd1984, just tried it in a different computer and it worked just fine.

Could you please try the following:

  • $ npm cache clean
  • $ npm i -g yo
  • $ npm i -g generator-ng-fullstack@1.3.4-0
  • And then inside your to-be-project: $ yo ng-fullstack

— Reply to this email directly or view it on GitHub https://github.com/ericmdantas/generator-ng-fullstack/issues/40#issuecomment-110696781 .

ericmdantas commented 9 years ago

@kidddddd1984, awesome!

@mcaudy, since it looked like it was an isolated problem, can I close this issue?

If there's something else that is not working, please let me know.

mcaudy commented 9 years ago

This latest version of the generator-ng-fullstack works on Mac Yosemite 10.10.3 The "XCode" problems that I reported to start this issue went away once I installed XCode on Yosemite.

ericmdantas commented 9 years ago

Alright, cool!

Closing this, then. Thanks for the feedbacks, guys!