Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run visualizer in an angular project. #8

Closed
Tallyb opened this issue Aug 4, 2016 · 3 comments
Closed

Cannot run visualizer in an angular project. #8

Tallyb opened this issue Aug 4, 2016 · 3 comments

Comments

@Tallyb
Copy link

Tallyb commented Aug 4, 2016

Any thoughts?
Unable to resolve some modules:

"./ReactElementValidator" in
/D/dev/meteor-angular-socially/node_modules/ui-router-visualizer/release/visualizer.min.js
(web.browser)
"./ReactDebugTool" in
/D/dev/meteor-angular-socially/node_modules/ui-router-visualizer/release/visualizer.min.js
(web.browser)
"./ReactDOMDebugTool" in
/D/dev/meteor-angular-socially/node_modules/ui-router-visualizer/release/visualizer.min.js
(web.browser)
"./ReactComponentTreeDevtool" in
/D/dev/meteor-angular-socially/node_modules/ui-router-visualizer/release/visualizer.min.js
(web.browser)

@christopherthielen
Copy link
Member

How do you get these errors? In the browser? During bundling?

How are you including the visualizer in your app? Script tag? Are you re-bundling it using webpack or something?


I'm publishing a UMD module with React inside the bundle. All the dependencies should be included in the main bundle.

@Tallyb
Copy link
Author

Tallyb commented Aug 6, 2016

I am in fact using meteor, so it has its own loader.
I tried the html tag option
index.html:
<script src="//npmcdn.com/ui-router-visualizer@2"></script>
run function:

var vis = window['ui-router-visualizer'];
vis.visualizer(ng1UIRouter);

I got the following error in Chrome devtools:
caught TypeError: Cannot read property 'visualizer' of undefined

trying the bundler option (presumably handled by meteor), and replacing the script tag and var vis with the import, I get the above error during compile.

I am assuming it has to do with Meteor way of bundling, so I am trying to request some assistance there.

@Tallyb
Copy link
Author

Tallyb commented Aug 6, 2016

ok - I managed to get option 2 (import) working. If anyone will need it with Meteor 1.4
Example is here: https://github.com/Tallyb/meteor-angular-socially_ui-router_1

@Tallyb Tallyb closed this as completed Aug 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants