← All tasks
javascriptemotion-js/emotion #3259Not a task: not reproduced

Import issues - Cannot find name 'EmotionCache'

envgap__emotion-js__emotion-3259

01 / FAILURE SIGNATURE

As reported upstream

After installing the package in a completely new project it cannot be run (both `ng s` and `ng build`) at all, indeed I receive this error:
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
31fa40b9089f77a8e70c5a4d9c5c4f9bab36f881
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

emotion-js/emotion #3259 · read the original issue
<!--

    Thanks for your interest in the project.

    Please make sure that you are familiar with and follow the Code of Conduct

    for this project (found in the CODE_OF_CONDUCT.md file).



    Please fill out this template with all the relevant information so we can

    understand what's going on and fix the issue.



    I'll probably ask you to submit the fix (after giving some direction).

    If you've never done that before, that's great! Check this free short

    video tutorial to learn how: http://kcd.im/pull-request

-->



**Current behavior:**

After installing the package in a completely new project it cannot be run (both `ng s` and `ng build`) at all, indeed I receive this error:



```

Application bundle generation failed. [1.957 seconds]



X [ERROR] TS2304: Cannot find name 'EmotionCache'. [plugin angular-compiler]



    node_modules/@emotion/css/dist/declarations/src/index.d.ts:10:63:

      10 │ ...import("./create-instance.js").CSSStyleSheet, cache: EmotionCache;

         ╵                                                         ~~~~~~~~~~~~

```



<!-- A clear and concise description of what the bug is -->



**To reproduce:**

1. Create a new project

2. Install the package using `npm i --save @emotion/css`

3. Use the `css` function in any point of the project

4. Run the application



Here's a [StackBlitz](https://stackblitz.com/edit/stackblitz-starters-b2zcnu?file=src%2Fmain.ts)



<!--

    Please edit this CodeSandbox (https://codesandbox.io/s/emotion-issue-template-y306ue)

    to help us reproduce your issue. Alternatively, create a GitHub repository.

    Issues without a reproducible example will take longer to get addressed.

-->



**Expected behavior:**

I expect it will compile and run properly



<!-- A clear and concise description of what you expected to happen -->



**Environment information:**

Completely new project, nothing different set at all



<!-- Provide the `react` and `@emotion/*` packages versions -->



- `Angular` version: 17.1.2 (18.1.0 in StackBlitz)

- `@emotion/react` version: 11.13.3 (current latest)

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]