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

OpaqueToken is not a constructor #2

Open
Chuvisco88 opened this issue Jan 15, 2018 · 10 comments
Open

OpaqueToken is not a constructor #2

Chuvisco88 opened this issue Jan 15, 2018 · 10 comments

Comments

@Chuvisco88
Copy link

Hi there

As I'm a huge fan of the localize-router, it's obvious for me to use the http-loader as well.
Unfortunately I'm receiving an error when starting the app via node.
I already looked a bit into it and from the error I would guess the issue is probably that I'm using Angular 5 (as I have found other repositories with the same error).
As far as I found out Angular 5 does not export OpaqueToken anymore (zefoy/ngx-perfect-scrollbar#113).

/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:692
var LOCALIZE_ROUTER_FORROOT_GUARD = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["OpaqueToken"]('LOCALIZE_ROUTER_FORROOT_GUARD');
                                    ^

TypeError: __WEBPACK_IMPORTED_MODULE_0__angular_core__.OpaqueToken is not a constructor
    at Object.module.exports (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:692:37)
    at __webpack_require__ (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:30:30)
    at Object.<anonymous> (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:260:82)
    at __webpack_require__ (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:30:30)
    at Object.module.exports (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:98:82)
    at __webpack_require__ (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:30:30)
    at Object.module.exports (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:961:83)
    at __webpack_require__ (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:30:30)
    at Object.<anonymous> (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:930:86)
    at __webpack_require__ (/node_modules/localize-router-http-loader/bundles/http-loader.umd.js:30:30)

As I currently can use the ManualParserLoader it isn't that big of an issue, but nonetheless would it be nice to make it compatible.

Thanks for your awesome work

@meeroslav
Copy link
Collaborator

@Chuvisco88, can you tell me which version of localize-router you are using?

This problem should be fixed in the latest version 1.0.0-rc.3.

@Chuvisco88
Copy link
Author

Chuvisco88 commented Jan 15, 2018

Hmmm strange, I double checked and I am already using 1.0.0-rc.3

EDIT: I did a quick search for OpaqueToken in both node_module folders (localize-router and localize-router-http-loader).
There was 1 occurence in localize-router (MIGRATION_GUIDE.md) and several occurences in localize-router-http-loader (most in http-loader.umd.js).

So I guess the issue is in localize-router-http-loader, but you have better insights on that.

@meeroslav
Copy link
Collaborator

meeroslav commented Jan 15, 2018

Okay, thanks for letting me know... then I need to rollout the new version. Probably was mistakenly deployed with old package still in place.

@prvn3294
Copy link

prvn3294 commented Feb 6, 2018

@meeroslav , Is there any update on this issue ?
I am also facing same issue while using it with angular universal.

@sarath704
Copy link

+1

Is there any update on this issue ?

@liyunfei0302
Copy link

+1

3 similar comments
@elSuperRiton
Copy link

+1

@markelor
Copy link

markelor commented Aug 7, 2018

+1

@ninjashare
Copy link

+1

meeroslav added a commit to meeroslav/localize-router-http-loader that referenced this issue Nov 4, 2018
@meeroslav
Copy link
Collaborator

Hi, the new version has been published.
I'm waiting for the access in order to merge it back to this branch.

Sorry for waiting

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

8 participants