NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Getting errors when running the NetBeans 8.0 AngularJS Seed template

 
Post new topic   Reply to topic    NetBeans Forums -> Web Client Users
View previous topic :: View next topic  
Author Message
Bruno



Joined: 05 Apr 2014
Posts: 3

PostPosted: Sat Apr 05, 2014 9:45 am    Post subject: Getting errors when running the NetBeans 8.0 AngularJS Seed template Reply with quote

Hello,

I downloaded NetBeans 8.0 (I'm new to NetBeans) to start an AngularJS project but I can't get the AngularJS template run:

I just did:

File -> New Project -> HTML5 Application -> AngularJS Seed Template -> Finish -> Run

but get these errors in the Output - Browser Log:

Failed to load resource: Unexpected end of file from server (11:32:11:218 | error, network)
at http://localhost:8383/bower_components/angular/angular.js
Failed to load resource: Unexpected end of file from server (11:32:11:234 | error, network)
at http://localhost:8383/bower_components/angular-route/angular-route.js

and the network monitor reports this:

Request URL: http://localhost:8383/bower_components/angular/angular.js
Method: GET
Status: Request was cancelled.

Request Headers
Accept: */*
Referer: http://localhost:8383/HTML5Application/index.html
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.14 (KHTML, like Gecko) JavaFX/2.2 Safari/535.14


Request URL: http://localhost:8383/bower_components/angular-route/angular-route.js
Method: GET
Status: Request was cancelled.

Request Headers
Accept: */*
Referer: http://localhost:8383/HTML5Application/index.html
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.14 (KHTML, like Gecko) JavaFX/2.2 Safari/535.14


Why are these requests cancelled?
Is there something I'm doing wrong?

Thank you!
Back to top
vriha



Joined: 07 Feb 2013
Posts: 110

PostPosted: Mon Apr 07, 2014 7:01 am    Post subject: Getting errors when running the NetBeans 8.0 AngularJS Seed template Reply with quote

Hi,
seems like Angular Seed has changed and now requires to install
dependencies manually using command "npm install" in project root. Have
a look at [1] for more details.


[1] https://github.com/angular/angular-seed


Lada

On 04/05/2014 11:45 AM, Bruno wrote:
Quote:
Hello,

I downloaded NetBeans 8.0 (I'm new to NetBeans) to start an AngularJS project but I can't get the AngularJS template run:

I just did:

File -> New Project -> HTML5 Application -> AngularJS Seed Template -> Finish -> Run

but get these errors in the Output - Browser Log:

Failed to load resource: Unexpected end of file from server (11:32:11:218 | error, network)
at http://localhost:8383/bower_components/angular/angular.js
Failed to load resource: Unexpected end of file from server (11:32:11:234 | error, network)
at http://localhost:8383/bower_components/angular-route/angular-route.js

and the network monitor reports this:

Request URL: http://localhost:8383/bower_components/angular/angular.js
Method: GET
Status: Request was cancelled.

Request Headers
Accept: */*
Referer: http://localhost:8383/HTML5Application/index.html
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.14 (KHTML, like Gecko) JavaFX/2.2 Safari/535.14


Request URL: http://localhost:8383/bower_components/angular-route/angular-route.js
Method: GET
Status: Request was cancelled.

Request Headers
Accept: */*
Referer: http://localhost:8383/HTML5Application/index.html
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.14 (KHTML, like Gecko) JavaFX/2.2 Safari/535.14


Why are these requests cancelled?
Is there something I'm doing wrong?

Thank you!



Back to top
Bruno



Joined: 05 Apr 2014
Posts: 3

PostPosted: Mon Apr 07, 2014 4:22 pm    Post subject: Reply with quote

Thanks Lada for your quick reply.

If I understand well, npm is a Node.js tool.
Does that mean that Node.js is required to run Angular Seed!?

Bruno
Back to top
vriha



Joined: 07 Feb 2013
Posts: 110

PostPosted: Tue Apr 08, 2014 10:49 am    Post subject: Getting errors when running the NetBeans 8.0 AngularJS Seed template Reply with quote

You're welcome. Yes, npm is tool for package management for NodeJS and
it appears to be required to install dependencies in angular seed. If
you install NodeJS from nodejs.org, npm will be installed together with
NodeJS.

Lada

On 04/07/2014 06:22 PM, Bruno wrote:
Quote:
Thanks Lada for your quick reply.

If I understand well, npm is a Node.js tool.
Does that mean that Node.js is required to run Angular Seed!?

Bruno



Back to top
Bruno



Joined: 05 Apr 2014
Posts: 3

PostPosted: Tue Apr 08, 2014 10:59 am    Post subject: Reply with quote

If this can help other people, I finally managed to run the AngularJS Seed in Netbeans by doing this:

- install node.js (with npm included)

- run command "npm install" under project root (HTML5Application directory). As I'm a newbye with node/npm, it took me ages to understand I had to run that command in this place...

- after having done this, there was a new bower_components directory but I still got the same errors in Netbeans. I had to copy it from the root to the app folder and rename all references "../bower_components/xxx" to "bower_components/xxx" in the index.html file and then it finally worked!
Back to top
ngluva



Joined: 10 Apr 2014
Posts: 1

PostPosted: Thu Apr 10, 2014 2:46 am    Post subject: Getting errors when running the NetBeans 8.0 AngularJS Seed template Reply with quote

This problem cost me 3 days and I gave up and started using sublime. Thanks to Bruno for asking the question and providing the followup and to Lada for providing an answer.

I have looked high and low for an answer to this problem.

What had me stumped is that I was using the Tutorial from here
https://blogs.oracle.com/geertjan/entry/angularjs_for_busy_developers_part

You can see at the beginning of the video that he doesn't do anything special about adding in support for Angular or Bower, it's all just supposed to work.

I couldn't find any requirements in the Netbeans documentation so I assumed that this was correct.

The folder structure is slightly different also.


Thanks
ngluva
Back to top
dkonecny



Joined: 29 Aug 2011
Posts: 5

PostPosted: Thu Apr 10, 2014 6:30 pm    Post subject: Getting errors when running the NetBeans 8.0 AngularJS Seed template Reply with quote

This is unfortunate. NetBeans is using the latests AngularJS Seed
project and this design decision has its advantages and disadvantages.
The biggest advantage is that developer always gets the latest AngularJS
Seed sources structure regardless of which version of NetBeans IDE they
are using. But that has a risk that if AngularJS Seed changes and have
new prerequisites then NetBeans IDE will not be able to use the template
out of the box. And that's what exactly happened.

This problem should be resolved in next NetBeans bugfix release (at
least by warning user in the wizard).

I'm not sure what would be the best way about this long term.

I'm sorry about this issue guys. Must be frustrating. I'm also sure
there is many more people out there with the same problem.
-David



On 10/04/14 14:46, ngluva wrote:
Quote:
This problem cost me 3 days and I gave up and started using sublime. Thanks to Bruno for asking the question and providing the followup and to Lada for providing an answer.

I have looked high and low for an answer to this problem.

What had me stumped is that I was using the Tutorial from here
https://blogs.oracle.com/geertjan/entry/angularjs_for_busy_developers_part

You can see at the beginning of the video that he doesn't do anything special about adding in support for Angular or Bower, it's all just supposed to work.

I couldn't find any requirements in the Netbeans documentation so I assumed that this was correct.

The folder structure is slightly different also.


Thanks
ngluva



Back to top
d0nalH0llow



Joined: 24 Apr 2014
Posts: 1

PostPosted: Thu Apr 24, 2014 9:17 pm    Post subject: Reply with quote

Bruno wrote:
If this can help other people, I finally managed to run the AngularJS Seed in Netbeans by doing this:

- install node.js (with npm included)

- run command "npm install" under project root (HTML5Application directory). As I'm a newbye with node/npm, it took me ages to understand I had to run that command in this place...

- after having done this, there was a new bower_components directory but I still got the same errors in Netbeans. I had to copy it from the root to the app folder and rename all references "../bower_components/xxx" to "bower_components/xxx" in the index.html file and then it finally worked!

This worked for me, although I had to move the bower_components directory to sit in the app directory rather than the html5application directory (so no ../ in the references). Many Thanks.

Annoying to see such a basic piece of functionality broken but oh well.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Web Client Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo