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

(intermediate value).compileString is not a function #26449

Closed
1 of 4 tasks
BrynjarF opened this issue Jun 7, 2024 · 2 comments
Closed
1 of 4 tasks

(intermediate value).compileString is not a function #26449

BrynjarF opened this issue Jun 7, 2024 · 2 comments

Comments

@BrynjarF
Copy link

BrynjarF commented Jun 7, 2024

Current Behavior

After migrating to Nx v19.2.1, you encounter the following error when building Angular libraries using @nx/angular i get the following error
TypeError: (intermediate value).compileString is not a function
at StylesheetProcessor.renderCss

Expected Behavior

After migrating to Nx v19.2.1, I expected to be able to build my Angular libraries using @nx/angular just as I could in version 18.3.4.

GitHub Repo

No response

Steps to Reproduce

  1. Have a integrated angular workspace (version 18.3.4 for me before migration)
  2. run npx nx migrate latest
  3. npm install
  4. run npx nx migrate --run-migrations
  5. try building a angular library

Nx Report

Node   : 18.18.2
OS     : win32-x64
npm    : 8.19.4

nx                 : 19.2.1
@nx/js             : 19.2.1
@nx/jest           : 19.2.1
@nx/linter         : 19.2.1
@nx/eslint         : 19.2.1
@nx/workspace      : 19.2.1
@nx/angular        : 19.2.1
@nx/devkit         : 19.2.1
@nx/eslint-plugin  : 19.2.1
@nx/playwright     : 19.2.1
@nrwl/tao          : 19.2.1
@nx/web            : 19.2.1
@nx/webpack        : 19.2.1
typescript         : 4.9.5
---------------------------------------
Community plugins:
@ngrx/schematics     : 15.4.0
@ngrx/store          : 15.4.0
@ngrx/store-devtools : 15.4.0
ngx-bootstrap        : 9.0.0

Failure Logs

------------------------------------------------------------------------------
Building entry point '@thula/core'
------------------------------------------------------------------------------
- Compiling with Angular sources in Ivy partial compilation mode.
✖ Compiling with Angular sources in Ivy partial compilation mode.
 NX   (intermediate value).compileString is not a function
TypeError: (intermediate value).compileString is not a function
    at StylesheetProcessor.renderCss (C:\src\emed\Client\node_modules\@nx\angular\src\executors\package\ng-packagr-adjustments\styles\stylesheet-processor.js:144:47)
    at async StylesheetProcessor.process (C:\src\emed\Client\node_modules\@nx\angular\src\executors\package\ng-packagr-adjustments\styles\stylesheet-processor.js:86:29)
    at async Object.readResource (C:\src\emed\Client\node_modules\ng-packagr\lib\ts\cache-compiler-host.js:147:37)
    at async Promise.all (index 2)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at async file:///C:/src/emed/Client/node_modules/@angular/compiler-cli/bundles/chunk-M65TNV27.js:6910:7
    at async NgCompiler.analyzeAsync (file:///C:/src/emed/Client/node_modules/@angular/compiler-cli/bundles/chunk-M65TNV27.js:6898:5)
    at async compileSourceFiles (C:\src\emed\Client\node_modules\@nx\angular\src\executors\package\ng-packagr-adjustments\ngc\compile-source-files.js:122:5)
    at async C:\src\emed\Client\node_modules\@nx\angular\src\executors\package\ng-packagr-adjustments\ng-package\entry-point\compile-ngc.transform.js:54:13

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@Coly010
Copy link
Contributor

Coly010 commented Jun 7, 2024

Hey! :) I can see you're using Node version 18.18.2.

Angular 18 is only compatible with Node ^18.19.1 as noted here: https://angular.dev/reference/versions

@Coly010 Coly010 closed this as completed Jun 7, 2024
Copy link

github-actions bot commented Jul 8, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants