-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
nx build doesn't work with angular 13 #7549
Comments
Hi there. Thank you for submitting the issue! We are planning to release Nx 13.2 with Angular 13 support once Angular 13 is out (which is I believe next week). |
@vsavkin Got it) thank you for your product) |
I have the same issue, any update ? I just migrate from Angular 12 to 13...:( |
Why is this closed if support hasn't landed yet? A bit confusing. It can't be tracked really. |
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. |
Current Behavior
I can't generate a new library with command ng generate @nrwl/angular:library
if i create this library manually i can't build any lib
Steps to Reproduce
https://github.com/SvetlanaMuravlova/angula-13/tree/nx-lib
In this repository you can find a project (branch nx-lib, angular 13 with nx 13.1.0)
if you will try to build an example lib you will get such error
on branch ng-library you can find a library which was generated with ng and everything works correctly
Failure Logs
Must use import to load ES Module: /home/vs/Project/for_cli/angula-13/node_modules/@angular/compiler-cli/bundles/index.js
require() of ES modules is not supported.
require() of /home/vs/Project/for_cli/angula-13/node_modules/@angular/compiler-cli/bundles/index.js from /home/vs/Project/for_cli/angula-13/node_modules/@nrwl/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/vs/Project/for_cli/angula-13/node_modules/@angular/compiler-cli/package.json.
Environment
"dependencies": {
"@angular/animations": "next",
"@angular/common": "next",
"@angular/compiler": "next",
"@angular/core": "next",
"@angular/forms": "next",
"@angular/platform-browser": "next",
"@angular/platform-browser-dynamic": "next",
"@angular/router": "next",
"@nrwl/workspace": "13.1.0",
"@nrwl/angular": "13.1.0",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "next",
"@angular/cli": "next",
"@angular/compiler-cli": "next",
"@nrwl/workspace": "13.1.0",
"@nrwl/cli": "13.1.0",
"@nrwl/devkit": "13.1.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.4.3"
}
The text was updated successfully, but these errors were encountered: