question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Admin Ui: Angular error when compiling AdminUiPlugin

See original GitHub issue

Compiling the AdminUiPlugin works with devMode since 1.0.0-beta.3 again, but now the compiled admin-ui throws an error in the Angular code when opening the admin page in browser: TypeError: e.factory is not a function

To Reproduce

  1. Start vendure server with AdminUiPlugin.init({ ... app: compileUiExtensions({ ... }) )
  2. Open admin page in Browser
  3. main.ts:16 TypeError: e.factory is not a function – page doesn’t load

Empty extensions: [] or parameters, including devMode, don’t seem to make a difference.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

4reactions
michaelbromleycommented, Mar 15, 2021

OK I think I have the reason right here: https://github.com/angular/angular/issues/41193#issuecomment-797554210

Packages must be compiled and ran using the exact same version of Angular; any other combination is not supported and likely to break in subtle ways.

So the @vendure/admin-ui/.. packages have been compiled with the compiler v11.2.4, but now you are trying to use those compiled files with compiler v11.2.5.

The solution is that I need to pin the dependencies of the ui-devkit package to exact patch versions which match those used by the admin-ui package. Currently they are listed as: https://github.com/vendure-ecommerce/vendure/blob/7cc7222f8241ddc5a2401faaed269a4a6f09f564/packages/ui-devkit/package.json#L39-L41

3reactions
michaelbromleycommented, Mar 15, 2021

What’s the long term solution for this?

I’ve implemented an automated check to ensure that Angular compiler versions match between the admin-ui & ui-devkit packages. This should prevent such errors being re-introduced in future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extending the Admin UI | Vendure docs
A UI extension is an Angular module which gets compiled into the Admin UI application ... vendure-config.ts plugins: [ AdminUiPlugin.init({ port: 3002, ...
Read more >
errors while Installing Ngx-Admin - node.js - Stack Overflow
I'm new to Angular and try to install ngx-admin template but I got ... C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js npm ERR!
Read more >
@vendure/admin-ui-plugin - npm
Start using @vendure/admin-ui-plugin in your project by running `npm i @vendure/admin-ui-plugin`. There is 1 other project in the npm ...
Read more >
Ngx-admin - Guideline to install. - GitHub Pages
Please note that **it is not possible** to build ngx-admin **without these tools** and it will not be possible because of the way...
Read more >
[Kodeo Admin UI] Support - WordPress.org
Scrolling down menu in admin dashboard. Started by: mktecknok ... update error. Started by: manu9912 ... Admin UI not work in Mailpoet page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found