generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

Not able to load client and server

Open casper123 opened this issue 8 years ago • 18 comments

I've installed angular-fullstack as provided in readme.md file. All installing went well. When I run gulp serve, webpack is complied successfully but both localhost:3000 and localhost:9000 doesn't work at all.

[email protected]:~/Documents/webapps/lab-app$sudo gulp serve
[12:46:31] Requiring external module babel-register
[12:46:40] Using gulpfile ~/Documents/webapps/lab-app/gulpfile.babel.js
[12:46:40] Starting 'serve'...
[12:46:40] Starting 'clean:tmp'...
[12:46:40] Starting 'lint:scripts'...
[12:46:40] Starting 'lint:scripts:client'...
[12:46:40] Starting 'lint:scripts:server'...
[12:46:40] Starting 'inject'...
[12:46:40] Starting 'inject:css'...
[12:46:40] Starting 'copy:fonts:dev'...
[12:46:40] Starting 'env:all'...
[12:46:40] Finished 'env:all' after 89 ms
[12:46:40] Finished 'clean:tmp' after 339 ms
[12:46:42] gulp-inject 3 files into app.css.
[12:46:42] Finished 'inject:css' after 1.88 s
[12:46:42] Finished 'inject' after 1.88 s
[12:46:43] Finished 'copy:fonts:dev' after 2.64 s
[12:46:43] 
/Users/abdulwahab/Documents/webapps/lab-app/client/components/modal/modal.service.js
  42:22  warning  Avoid using Function.prototype.call, instead use Reflect.apply   prefer-reflect
  42:49  warning  Use the rest parameters instead of 'arguments'                   prefer-rest-params
  68:13  warning  Avoid using Function.prototype.apply, instead use Reflect.apply  prefer-reflect

✖ 3 problems (0 errors, 3 warnings)

[12:46:43] Finished 'lint:scripts:client' after 2.98 s
[12:46:43] 
/Users/abdulwahab/Documents/webapps/lab-app/server/index.js
  4:11  warning  Unexpected use of process.env  no-process-env
  4:34  warning  Unexpected use of process.env  no-process-env

/Users/abdulwahab/Documents/webapps/lab-app/server/config/express.js
  65:25  warning  Unexpected use of process.env  no-process-env

/Users/abdulwahab/Documents/webapps/lab-app/server/config/seed.js
  11:2  error  Expected indentation of 3 space characters but found 0  indent
  12:3  error  Expected indentation of 2 space characters but found 0  indent
  14:4  error  Expected indentation of 2 space characters but found 0  indent
  15:5  error  Expected indentation of 2 space characters but found 0  indent
  16:5  error  Expected indentation of 2 space characters but found 0  indent
  20:5  error  Expected indentation of 2 space characters but found 0  indent
  21:5  error  Expected indentation of 2 space characters but found 0  indent
  24:5  error  Expected indentation of 2 space characters but found 0  indent
  25:5  error  Expected indentation of 2 space characters but found 0  indent
  29:5  error  Expected indentation of 2 space characters but found 0  indent
  30:5  error  Expected indentation of 2 space characters but found 0  indent
  33:5  error  Expected indentation of 2 space characters but found 0  indent
  34:5  error  Expected indentation of 2 space characters but found 0  indent
  38:5  error  Expected indentation of 2 space characters but found 0  indent
  39:5  error  Expected indentation of 2 space characters but found 0  indent
  45:3  error  Unnecessary semicolon                                   no-extra-semi
  46:1  error  Expected indentation of 1 space character but found 0   indent
  46:2  error  Newline required at end of file but not found           eol-last

/Users/abdulwahab/Documents/webapps/lab-app/server/api/thing/thing.controller.js
   29:7  warning  Avoid using Function.prototype.apply, instead use Reflect.apply     prefer-reflect
   91:5  warning  Avoid using the delete keyword, instead use Reflect.deleteProperty  prefer-reflect
  102:5  warning  Avoid using the delete keyword, instead use Reflect.deleteProperty  prefer-reflect

✖ 24 problems (18 errors, 6 warnings)

[12:46:43] Finished 'lint:scripts:server' after 3.22 s
[12:46:43] Finished 'lint:scripts' after 3.29 s
[12:46:43] Starting 'start:server'...
[12:46:43] Finished 'start:server' after 18 ms
[12:46:43] Starting 'start:client'...
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /Users/abdulwahab/Documents/webapps/lab-app/server/**/*
[nodemon] starting `node server`
Express server listening on 9000, in development mode
(node:26317) Warning: a promise was created in a handler at Users/abdulwahab/Documents/webapps/lab-app/server/config/seed.js:14:10 but was not returned from it, see http://goo.gl/rRqMUw
    at new Promise (/Users/abdulwahab/Documents/webapps/lab-app/node_modules/bluebird/js/release/promise.js:79:10)
finished populating things
[BS] Proxying: http://localhost:9000
[BS] Access URLs:
 --------------------------------------
       Local: http://localhost:3000
    External: http://192.168.0.123:3000
 --------------------------------------
          UI: http://localhost:3002
 UI External: http://192.168.0.123:3002
 --------------------------------------
webpack done hook
Hash: d14fc01ef68064d5e92e
Version: webpack 1.14.0
Time: 13586ms
                                 Asset     Size  Chunks             Chunk Names
  b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]  
  f4769f9bdb7466be65088239c12046d1.eot  20.1 kB          [emitted]  
 fa2772327f55d8198301fdb8bcfc8158.woff  23.4 kB          [emitted]  
  e18bbf611f2a2e43afc071aa2f4e1512.ttf  45.4 kB          [emitted]  
  89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]  
  674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]  
af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]  
 fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]  
448c34a56d699c29117adc64c43affeb.woff2    18 kB          [emitted]  
  912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  
                         app.bundle.js   223 kB       0  [emitted]  app
                   polyfills.bundle.js   205 kB       1  [emitted]  polyfills
                      vendor.bundle.js  2.55 MB       2  [emitted]  vendor
                     app.bundle.js.map   298 kB       0  [emitted]  app
               polyfills.bundle.js.map   267 kB       1  [emitted]  polyfills
                  vendor.bundle.js.map  2.97 MB       2  [emitted]  vendor
                  ../client/index.html  1.39 kB          [emitted]  
Child html-webpack-plugin for "../client/index.html":
                   Asset     Size  Chunks       Chunk Names
    ../client/index.html  2.69 kB       0       
webpack: Compiled successfully.
Item Version
generator-angular-fullstack x.x.x
Node v6.7.0
npm 4.3.0
Operating System OS X 10
Item Answer
Transpiler Babel /
Markup HTML
CSS CSS
Router ui-router
Client Tests Jasmine
DB MongoDB
Auth N

casper123 avatar Mar 30 '17 08:03 casper123

Which generator version are you using? What have you tried to debug this problem? What other symptoms are there?

Awk34 avatar Apr 02 '17 20:04 Awk34

I'm using following version

yo 1.8.5

gulp --version [14:54:32] Requiring external module babel-register [14:54:32] CLI version 1.3.0 [14:54:32] Local version 3.9.1

node --version v6.10.1

Please check screen shot as well. It just stucks there screen shot 2017-05-11 at 2 53 50 pm

casper123 avatar May 11 '17 09:05 casper123

It doesn't look stuck to me. That's what it should show when the client is done compiling. You should be able to open your browser to http://localhost:3000/ at this point.

Awk34 avatar May 11 '17 16:05 Awk34

Use $ npm ls -g --depth=0 | grep angular-fullstack to find out the version of the generator you have installed

Awk34 avatar May 11 '17 16:05 Awk34

I have the latest genertor installed. http://localhost:3000 just keeps on loading nothing happens. It is supposed to open up browser by itself but this doesn't happen as well

Sent from my iPhone

On 11-May-2017, at 21:05, Andrew Koroluk [email protected] wrote:

Use $ npm ls -g --depth=0 | grep angular-fullstack to find out the version of the generator you have installed

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

casper123 avatar May 11 '17 16:05 casper123

Do you get any errors in the browser console? Or network errors?

Awk34 avatar May 11 '17 16:05 Awk34

Nothing at all, no errors on console or browser. The browser just keeps on loading and console keeps as it is. I will make a video tomorrow and post here so you can better understand

Sent from my iPhone

On 11-May-2017, at 21:54, Andrew Koroluk [email protected] wrote:

Do you get any errors in the browser console? Or network errors?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

casper123 avatar May 11 '17 17:05 casper123

ugh, nothing suspicious in either console makes this very hard to debug..

Awk34 avatar May 11 '17 17:05 Awk34

Okay I've done some nice debugging. So here are some strange situations

  1. My .tmp directory is always empty
  2. function whenServerReady(cb) always keeps returning false

Any idea what could be the reason? I even tried running gulp with sudo

casper123 avatar May 13 '17 16:05 casper123

You don't have anything else running on port 3000 do you?

The .tmp dir probably isn't getting populated because the webpack-dev-server keeps the files in memory for increased speed

Awk34 avatar May 13 '17 17:05 Awk34

Try just doing a dev webpack build, and see if the files put into .tmp work fine

Awk34 avatar May 13 '17 17:05 Awk34

Is there a command for that?

Regards

Abdul Wahab Kotwal http://casperkotwal.me l casper

Skype: wahabkotwal123 l Gtalk: casper.kotwal Mobile l Whatsapp : +923218651457 Email: [email protected] [image: http://curiouslabx.com/] http://curiouslabx.com/ [image: http://sandbox.com.pk/] http://sandbox.com.pk/ http://www.fixmyphone.pk/

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error.

P Please consider the environment before printing this e-mail

On Sat, May 13, 2017 at 10:14 PM, Andrew Koroluk [email protected] wrote:

Try just doing a dev webpack build, and see if the files put into .tmp work fine

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angular-fullstack/generator-angular-fullstack/issues/2533#issuecomment-301261518, or mute the thread https://github.com/notifications/unsubscribe-auth/ACn9TURPc_hke4x66AtOsEh4XnNkRx3cks5r5eTtgaJpZM4MuACf .

casper123 avatar May 13 '17 17:05 casper123

Just gulp webpack:dev

Awk34 avatar May 13 '17 17:05 Awk34

Tried this one, it does populate files in .tmp directory but running gulp serve on http://localhost:3000 still not loading the page. It just keeps on loading, no errors either in console or cli

Regards

Abdul Wahab Kotwal http://casperkotwal.me l casper

Skype: wahabkotwal123 l Gtalk: casper.kotwal Mobile l Whatsapp : +923218651457 Email: [email protected] [image: http://curiouslabx.com/] http://curiouslabx.com/ [image: http://sandbox.com.pk/] http://sandbox.com.pk/ http://www.fixmyphone.pk/

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error.

P Please consider the environment before printing this e-mail

On Sat, May 13, 2017 at 10:27 PM, Andrew Koroluk [email protected] wrote:

Just gulp webpack:dev

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angular-fullstack/generator-angular-fullstack/issues/2533#issuecomment-301262282, or mute the thread https://github.com/notifications/unsubscribe-auth/ACn9Tao2oMMqaKrddNw3SJJnVnxRiVq5ks5r5efogaJpZM4MuACf .

casper123 avatar May 13 '17 17:05 casper123

I did some more debugging and found this error with http in gulpfile.babel.js This error is returned by checkAppReady function

function checkAppReady(cb) {
    var options = {
        host: 'localhost',
        port: config.port
    };
    http
        .get(options, () => cb(true))
        .on('error', (err) => cb(false, err));
}
{ Error: socket hang up
  at createHangUpError (_http_client.js:253:15)
  at Socket.socketOnEnd (_http_client.js:345:23)
  at emitNone (events.js:91:20)
  at Socket.emit (events.js:185:7)
  at endReadableNT (_stream_readable.js:974:12)
  at _combinedTickCallback (internal/process/next_tick.js:80:11)
  at process._tickDomainCallback (internal/process/next_tick.js:128:9)
 code: 'ECONNRESET' }

casper123 avatar May 17 '17 08:05 casper123

having same issue. gulp serve start the client and server but .tmp folder always empty. but when this i run this command gulp webpack:dev this will add files to .tmp. on gulp serve cannot get / this error came.

generator-angular-fullstack version 5.0.0-rc.3

umimehar avatar Jul 11 '18 08:07 umimehar

Anyone got any fix?

umimehar avatar Jul 11 '18 08:07 umimehar

I am facing the same problem with gulp serve, and on running the application separately using npm run start:client and npm run start:server files are not getting minified. app.bundle.js is around 16mb. How to run in production mode @Awk34

generator-angular-fullstack version 5.0.0-rc.4 angular version 7 node version 10

abhishek0494 avatar Feb 07 '19 11:02 abhishek0494