Greentube / localize-router-http-loader

Http loader for LocalizeRouterParser
MIT License
11 stars 8 forks source link

OpaqueToken is not a constructor #2

Open Chuvisco88 opened 6 years ago

Chuvisco88 commented 6 years ago

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 (https://github.com/zefoy/ngx-perfect-scrollbar/issues/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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

sarath704 commented 6 years ago

+1

Is there any update on this issue ?

liyunfei0302 commented 6 years ago

+1

elSuperRiton commented 6 years ago

+1

markelor commented 6 years ago

+1

ninjashare commented 5 years ago

+1

meeroslav commented 5 years ago

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