Skip to content

Error: The importer must return an absolute URL, was "[object Promise]" #34309

Closed

Description

@johnbotris

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

22.1.7

Description

After upgrading from 22.1.7 to 22.2.0, the initial build succeeds but we get an error during stylesheet rebuilds from an SSR request:

[ERROR] Error: The importer must return an absolute URL, was "%5Bobject%20Promise%5D"
  ╷
1 │ @use 'theme' as *;
  │ ^^^^^^^^^^^^^^^^^
  ╵
  /tmp/apps/powerus/src/styles/base-style.scss 1:1
  root stylesheet [plugin angular-sass]

Minimal Reproduction

  1. Create an Angular CLI 22.2.0 app with server-side rendering, Zone.js enabled, and SCSS.
  2. Create _theme.scss in a separate folder and add that folder to stylePreprocessorOptions.includePaths.
  3. Add @use 'theme' to the app’s main stylesheet.
  4. Set the page’s server route to RenderMode.Server and run ng serve.
  5. Open the page so the server renders it and loads Zone.js.
  6. Edit and save the main stylesheet to trigger another build.
  7. Observe The importer must return an absolute URL, was "%5Bobject%20Promise%5D".

Exception or Error

Error: The importer must return an absolute URL, was "%5Bobject%20Promise%5D"
  ╷
1 │ @use 'theme';
  │ ^^^^^^^^^^^^
  ╵
  ../../../../src/styles.scss 1:1  root stylesheet
angular:styles/global:styles:1:8

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI       : 22.2.0
Angular           : 22.2.0
Node.js           : 24.15.0
Package Manager   : pnpm 12.4.1
Operating System  : darwin arm64

┌───────────────────────────────────┬───────────────────┬───────────────────┐
│ Package                           │ Installed Version │ Requested Version │
├───────────────────────────────────┼───────────────────┼───────────────────┤
│ @angular-devkit/build-angular     │ 22.2.0            │ 22.2.0            │
│ @angular-devkit/core              │ 22.2.0            │ 22.2.0            │
│ @angular-devkit/schematics        │ 22.2.0            │ 22.2.0            │
│ @angular/animations               │ 22.2.0            │ 22.2.0            │
│ @angular/build                    │ 22.2.0            │ 22.2.0            │
│ @angular/cdk                      │ 22.2.0            │ 22.2.0            │
│ @angular/cli                      │ 22.2.0            │ 22.2.0            │
│ @angular/common                   │ 22.2.0            │ 22.2.0            │
│ @angular/compiler                 │ 22.2.0            │ 22.2.0            │
│ @angular/compiler-cli             │ 22.2.0            │ 22.2.0            │
│ @angular/core                     │ 22.2.0            │ 22.2.0            │
│ @angular/forms                    │ 22.2.0            │ 22.2.0            │
│ @angular/language-service         │ 22.2.0            │ 22.2.0            │
│ @angular/platform-browser         │ 22.2.0            │ 22.2.0            │
│ @angular/platform-browser-dynamic │ 22.2.0            │ 22.2.0            │
│ @angular/platform-server          │ 22.2.0            │ 22.2.0            │
│ @angular/router                   │ 22.2.0            │ 22.2.0            │
│ @angular/service-worker           │ 22.2.0            │ 22.2.0            │
│ @angular/ssr                      │ 22.2.0            │ 22.2.0            │
│ @schematics/angular               │ 22.2.0            │ 22.2.0            │
│ rxjs                              │ 7.8.2             │ 7.8.2             │
│ typescript                        │ 6.0.3             │ 6.0.3             │
│ webpack                           │ 5.111.1           │ 5.111.1           │
│ zone.js                           │ 0.16.3            │ 0.16.3            │
└───────────────────────────────────┴───────────────────┴───────────────────┘

Anything else relevant?

No response

Activity

  1. added this to the needsTriage milestone on Oct 12, 2026
  2. added a commit that references this issue on Oct 12, 2026
    38b82cd
  3. angular-automatic-lock-bot commented on Nov 12, 2026

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  4. locked and limited conversation to collaborators on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions