Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Docs failed to install at locally #4079

Closed
gouravsood opened this issue Aug 10, 2015 · 14 comments
Closed

Docs failed to install at locally #4079

gouravsood opened this issue Aug 10, 2015 · 14 comments

Comments

@gouravsood
Copy link

Hi Team,

I have tried to follow the instructions given at URL https://github.com/angular/material/blob/master/docs/README.md and even at :https://github.com/angular/material#-building but documentation never worked at local.

I can see exceptions in console which are shown in attached pictures.

Please help me to solve this issue and setup docs at local.

Thanks,
Gourav.
dist-docs-error
dist-docs-page
mainpage

@topherfangio
Copy link
Contributor

Hi @gouravsood,

I am not seeing this issue with the latest master branch. What version are you using?

Also, it's not documented, but a better command might be gulp watch as that will compile/host the docs and watch for any changes.

@NickBolles
Copy link

I was seeing this a while back too. The material.components.menu module was trying to be loaded and couldn't be. I just nuked the src/components/menu folder while I was working...

@gouravsood
Copy link
Author

HI @topherfangio ,

I have again taken master code and followed below steps (mentioned in https://github.com/angular/material/blob/master/docs/README.md#docs)

To view the Live Docs (locally):

Install the dependencies using npm install
Build the docs using gulp docs
Start server gulp server

But I still have the same problem.

Uncaught Error: [$injector:nomod] http://errors.angularjs.org/1.4.3/$injector/nomod?p0=material.components.menu(anonymous function) @ angular.js:38(anonymous function) @ angular.js:1958a @ angular.js:1882P.bootstrap @ angular.js:1956(anonymous function) @ angular-material.min.js:9(anonymous function) @ angular-material.min.js:9(anonymous function) @ angular-material.min.js:14 angular.js:38

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.3/$injector/modulerr?p0=docsApp&p1=Error%3A…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.3%2Fangular.min.js%3A19%3A339)

Hi @NickBolles ,

As you suggested I removed /src/components/menu folder that helped to load the page but caused other errors :(

GET http://localhost:8080/docs.json 404 (Not Found)b @ angular.js:10514n @ angular.js:10333$get.f @ angular.js:10045(anonymous function) @ angular.js:14567$get.n.$eval @ angular.js:15846$get.n.$digest @ angular.js:15657$get.n.$apply @ angular.js:15951(anonymous function) @ angular.js:1633e @ angular.js:4450d @ angular.js:1631Ac @ angular.js:1651Zd @ angular.js:1545(anonymous function) @ angular.js:28359a @ angular.js:2996c @ angular.js:3271 angular.js:12330 URL visited /demo/material.components.autocomplete angular.js:12330

TypeError: Cannot read property 'getElementsByTagName' of undefined
at L (angular-material.min.js:11)
at new e (angular-material.min.js:13)
at Object.e as invoke
at $get.P.instance (angular.js:8999)
at S (angular.js:8109)
at g (angular.js:7541)
at S (angular.js:8145)
at g (angular.js:7541)
at S (angular.js:8145)
at g (angular.js:7541)

Attached is snapshot of error.
moreerrors

Thanks,
Gourav.

@topherfangio topherfangio added the resolution: can't reproduce The team is unable to reproduce this issue with the information provided label Aug 11, 2015
@topherfangio
Copy link
Contributor

Hi @gouravsood,

I am honestly not sure what is wrong. I did those exact same steps:

  1. git clone git@github.com/angular/material.git
  2. cd material
  3. npm install
  4. gulp docs
  5. gulp server

And everything worked perfectly for me.

Since we can't reproduce the issue, I'm afraid we can't help. I'm going to go ahead and close this issue. Please do comment if you find the issue so that others will know.

@NickBolles
Copy link

@gouravsood Try modifying the /dist/docs/index.html line 166 to <script src="angular-material.js"></script> does that fix it for you? it does for me. It must be a minification issue.

@gouravsood
Copy link
Author

Hi @topherfangio and @NickBolles ,

Thanks a lot for your help on this issue.

I used other machine (ubuntu) and there sorted all the dependencies and followed it from scratch. That worked.

So I think it could be due to few dependencies not sorted when i ran npm install on my Windows 7 machine. I will try to re-install nodejs and get npm modules again and see.

Thanks,
Gourav.

@gouravsood
Copy link
Author

Hi @NickBolles,

Tried to take out minified file and using unminified also not helping.

@NickBolles
Copy link

hmmm odd. Its working fine for me with the unminified angular-material.js and the deleted menu component folder. But ya it is probably some sort of issue with npm modules not being in the expected places on windows. I'm gonna dig into it more tonight cuz its really annoying me.

@gouravsood
Copy link
Author

Hi @NickBolles,

My apologies for this. I was not following both steps as you mentioned.

  • Delete src/components/menu folder
  • modifying the /dist/docs/index.html line 166 to <script src="angular-material.js"></script>

Now I have done both and this has sorted the issue. 👍 👍 👍

FINALLY I have the docs installed locally.. :)

So final steps to get the docs installed are:

@topherfangio I think, somebody should look at the Menu component issue and the minification of angular-material.js file.

Thanks a ton @NickBolles for your support on this.

Thanks,
Gourav.

@NickBolles
Copy link

Ok Cool. Well Not that that really gets us anywhere. Its still an issue and every time you build the docs you need to change the line in index.html. I took a deeper look and dont really know where the issue is.

Maybe it has something to do with the handling of globs in windows vs linux. Idk.

@topherfangio
Copy link
Contributor

If you guys are on Windows, that may make a huge difference. I should be
switching to Windows sometime next week to test some IE issues and I will
take another look at it then.

Glad you have a workaround for the time being :-)

On Tue, Aug 11, 2015 at 11:02 PM Nick Bolles notifications@github.com
wrote:

Ok Cool. Well Not that that really gets us anywhere. Its still an issue
and every time you build the docs you need to change the line in
index.html. I took a deeper look and dont really know where the issue is.

Maybe it has something to do with the handling of globs in windows vs
linux. Idk.


Reply to this email directly or view it on GitHub
#4079 (comment).

@topherfangio topherfangio self-assigned this Aug 12, 2015
@topherfangio topherfangio added type: build type: docs severity: inconvenient and removed resolution: can't reproduce The team is unable to reproduce this issue with the information provided labels Aug 12, 2015
@topherfangio topherfangio reopened this Aug 12, 2015
@NickBolles
Copy link

Just Saw this on the forums
https://groups.google.com/forum/#!topic/ngmaterial/XWqE2nLPS3E

@Splaktar
Copy link
Member

This indeed is Windows specific. I've got a PR open that should address this, though I don't see a major issue with the menu component injection. But I did do some minor clean up in _menu.js.

@ThomasBurleson
Copy link
Contributor

Closed with SHA 35ce9b8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants