Closed JosephSKh closed 6 years ago
What are the steps you take to run your app?
@Awk34 I'm using the configurations above, I've already started my mongo db engine, and i use gulp serve
@Awk34 a small hint, sometimes it works with npm run start:client
,,, but never with gulp serve
Are you sure you are using 4.1.x and not 5.x.x?
https://github.com/angular-fullstack/generator-angular-fullstack/issues/2711 has the same Problem for 5.0.0-rc1.
Check https://angular-fullstack.github.io/get-started/running/
It is npm run start:server
and npm run start:client
instead of gulp serve
in 5.x.x
@albert-92 you mean it's gulp serve
for AngularJs and npm run start:whatever
for Angular 2+ ?
@albert-92 oh ok I think that explains it, I'm using v5.0.0-rc.1
you mean it's gulp serve for AngularJs and npm run start:whatever for Angular 2+ ?
Exactly
I also have this problem. I am running npm run start:server
and npm run start:client
and still I get the unexpected token error and it is stuck on the "Loading... "
I think the problem is we're pointing our browsers to port 9000 but the full webpack/gulp magic is happening at 8080, the output of the npm run start:*
is confusing and the only url we see is localhost:9000 so we go there by mistake...
The error is because express sends app.html as the javascript files because of the routing in the plain server running at 9000
@koraysels make sure you are using Version 4.1.x
not v5.0.0-rc.1
Run npm run start:server
then npm run start:client
what do you mean ? I want angular fullstack with angular 2+ .. It is working if i go to port 8080 instead of 9000. so that's a win! now I only need to figure out how to get the 'client' working in a docker container.. 'server' is working but 'client' does nothing :(
npm run start:client
should always display that it's output is shown at localhost:8080
(or a different port if you changed it. This is coming directly from Webpack.
I appreciate the comments. I can only improve the project with either direct contributions or specific comments I can take action on.
There's a super-old PR I made involving Docker: https://github.com/angular-fullstack/generator-angular-fullstack/pull/2290/files . I plan on re-doing this in the future, so the PR isn't quite up-to-par, but it might give you some more info @koraysels
My 'npm run start:client' runs fine but 'npm run start:server' causes this "Uncaught SyntaxError: Unexpected token <". I am not understanding what's the problem? I am using
@malkyfaith are you opening your browser to http://localhost:8080?
@Awk34 I am running two different power shells to access client on 8080 and server on 9000.
I get
Uncaught SyntaxError: Unexpected token <
in the browser after the initial launch of the generator and stuck atLoading...