Esstou digitando este comando:
ng add @angular-architects/module-federation --project desif-app --port 4200 --skip-confirmation
Ai mostra isto no console e não prossegue
Skipping installation: Package already installed
WARNING: This package uses the tradtional webpack-based Module Federation implementation and not the fast new esbuild-based ApplicationBuilder.
For new projects, consider Native Federation as an alternative: https://shorturl.at/0ZQ0j
However, if you want to add a new host or remote to an existing Module Federation-based system, this package is what you are looking for.
Do you want to proceeed: [y] Yes [n] No
process.stdin.setRawMode is not a function
O que pode ser ?
gil3
Setembro 9, 2024, 9:17pm
#2
talves algo da sua versão ou instalação do nodejs, ou seu terminal
1 curtida
Se for o node v16.18.0
Mostra este erro
Se for o 18.19.0, mostra o erro da dúvida inicial
O terminal é o do git bash
package
{
"name": "projeto",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular-architects/module-federation": "^18.0.4",
"@angular/animations": "^17.2.0",
"@angular/common": "^17.2.0",
"@angular/compiler": "^17.2.0",
"@angular/core": "^17.2.0",
"@angular/forms": "^17.2.0",
"@angular/platform-browser": "^17.2.0",
"@angular/platform-browser-dynamic": "^17.2.0",
"@angular/router": "^17.2.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.9",
"@angular/cli": "^17.2.0",
"@angular/compiler-cli": "^17.2.0",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.3.2",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
}
}
Instalei o npm i @angular-architects/module-federation@17.0.8
Instalei o @angular-architects /native-federation": "^17.1.8
{
"name": "projeto",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"run:all": "node node_modules/@angular-architects/module-federation/src/server/mf-dev-server.js"
},
"private": true,
"dependencies": {
"@angular-architects/module-federation": "^17.0.8",
"@angular/animations": "^17.2.0",
"@angular/common": "^17.2.0",
"@angular/compiler": "^17.2.0",
"@angular/core": "^17.2.0",
"@angular/forms": "^17.2.0",
"@angular/platform-browser": "^17.2.0",
"@angular/platform-browser-dynamic": "^17.2.0",
"@angular/router": "^17.2.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-architects/native-federation": "^17.1.8",
"@angular-devkit/build-angular": "^17.3.9",
"@angular/cli": "^17.2.0",
"@angular/compiler-cli": "^17.2.0",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"ngx-build-plus": "^17.0.0",
"typescript": "~5.3.2",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
}
}
E funcionou o comando agora.
add @angular-architects/module-federation --project desif-app --port 4200 --skip-confirmation