• othiagocruz

    othiagocruz

    1 year ago
    "next": "^10.0.7",
    im running this version of next
  • othiagocruz

    othiagocruz

    1 year ago
    "supertokens-auth-react": "^0.7.2",
        "supertokens-node": "^4.1.2"
    and these supertokens versions
  • r

    rp

    1 year ago
    I'm using
    10.0.3
    next version. This should be compatible with your next version
  • r

    rp

    1 year ago
    the error is pages is undefined. Where is that coming from?
  • othiagocruz

    othiagocruz

    1 year ago
    could be webpack
  • othiagocruz

    othiagocruz

    1 year ago
    because its happening on the browser
  • othiagocruz

    othiagocruz

    1 year ago
    function resolveDynamicRoute(parsedHref, pages) {
      var applyBasePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
      var pathname = parsedHref.pathname;
      var cleanPathname = (0, _normalizeTrailingSlash.removePathTrailingSlash)((0, _denormalizePagePath.denormalizePagePath)(applyBasePath ? delBasePath(pathname) : pathname));
    
      if (cleanPathname === '/404' || cleanPathname === '/_error') {
        return parsedHref;
      } // handle resolving href for dynamic routes
    
    
      if (!pages.includes(cleanPathname)) {
        // eslint-disable-next-line array-callback-return
        pages.some(function (page) {
          if ((0, _isDynamic.isDynamicRoute)(page) && (0, _routeRegex.getRouteRegex)(page).re.test(cleanPathname)) {
            parsedHref.pathname = applyBasePath ? addBasePath(page) : page;
            return true;
          }
        });
      }
    
      parsedHref.pathname = (0, _normalizeTrailingSlash.removePathTrailingSlash)(parsedHref.pathname);
      return parsedHref;
    }
  • othiagocruz

    othiagocruz

    1 year ago
    this is the next function that fails
  • r

    rp

    1 year ago
    Maybe don't use SuperTokensComponentNoSSR at all and try?
  • othiagocruz

    othiagocruz

    1 year ago
    how do i import that directly?