#'"@angular/core"' has no exported member named 'input'.
64 messages · Page 1 of 1 (latest)
Uppercase I in Input
Looks like you already have it imprted. Just delete the lower case i input import.
no I need with lower case. I am following a tutorial for Using Signal inputs
https://angular.io/api/core/input like here
Version of the CLI doesn't really matter. What is the version of @angular/corethat you have installed?
"@angular/core": "^17.0.1",
Hm. Should work. Hard to say without further input. Might even just be an IDE glitch.
how can I fix this if it is an IDE glitch?
Does ng serve or ng build work?
before yes, after using "input" not more, because I have now couple of errors
it works but I recieve an error
Is the input the same, that it cannot import it? Or other?
What do you mean by that exactly?
the error the same* is what I meant, sorry.
so it works, but I have errors here
The errors are in your IDE. So this definitely looks like an IDE problem.
Make sure VSCode and Extensions are up to date. (I don't use VSCode, I don't know how Angular support works there)
which one do you use?
okeee, thank you
What's the error text when you hover it?
Property 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE' does not exist on type 'typeof import("c:/Users/sanzha64/udemyAngular/angular-course/node_modules/@angular/core/index")'.ngtsc(2339)
app.component.ts(14, 70): Error occurs in the template of component AppComponent.
(property) UserComponent.avatar: any
Weird indeed
but now it doesnt work, I didnt change anything ...hhm
Are you on Windows? Try importing only input, not Input and input.
yes windows, no changes
Sorry, I misread the error message. Are you using NPM?
yes
Can you please run npm ls @angular/core and show the output?
This is very strange. All I can think of is delete node_modules and reinstall 😂
ok thanks, I will try
ng version will tell you what you exactly have
what do you mean?
{
"name": "angular-course",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config ./proxy.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"server": "ts-node -P ./server.tsconfig.json ./server.ts"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.0.1",
"@angular/cdk": "^17.0.0",
"@angular/common": "^17.0.1",
"@angular/compiler": "^17.0.1",
"@angular/core": "^17.0.1",
"@angular/elements": "^17.0.1",
"@angular/forms": "^17.0.1",
"@angular/localize": "^17.0.1",
"@angular/material": "^17.0.0",
"@angular/platform-browser": "^17.0.1",
"@angular/platform-browser-dynamic": "^17.0.1",
"@angular/router": "^17.0.1",
"body-parser": "^1.18.3",
"core-js": "^2.5.4",
"cors": "^2.8.5",
"document-register-element": "1.8.1",
"express": "^4.16.3",
"rxjs": "^6.5.4",
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.0",
"@angular/cli": "^17.0.0",
"@angular/compiler-cli": "^17.0.1",
"@angular/language-service": "^17.0.1",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"ts-node": "~5.0.1",
"tslint": "~6.1.0",
"typescript": "~5.2.2"
}
}
quickest way, delete the node modules and the lock file
lock file? package.json?
package-lock.json or yarn.lock
after delete and npm install I receive this error
restored and reinstalled npm, I receive the same error when I do ng serve
inputhas been introduced in 17.1, you need to update your angular dependencies.
That's a good opportunity to update to 18 directly with: ng update @angular/core@18 @angular/cli@18
angular-errors.log: [error] FetchError: request to https://registry.npmjs.org/@angular%2Fcli failed, reason: unable to get local issuer certificate
at ClientRequest.<anonymous> (C:\Users\sanzha64\udemyAngular\angular-course\node_modules\minipass-fetch\lib\index.js:130:14)
at ClientRequest.emit (node:events:518:28)
at _destroy (node:_http_client:880:13)
at onSocketNT (node:_http_client:900:5)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
Morel likely due to a corporate firewall?
it works (I mean "input") in other projects, so only in angular-course not
what's the angular version in package.json of these projects?
in other projects 17.3.4, in this 17.0.0
Like i told you => introduced in 17.1
I have now 18.1.4. I deinstalled it an reinstalled. But I have the same problem..
plese show your updated package.json file
@compact plume as explained at the start of the discussion, the global Angular CLI does not matter, what's matter is the version INSIDE your project.
The global one is useful to create projects. By using ng new you'll get a new one with 18.1 for example but it won't afffect existing ones.
Can I deinstall angular und delete the text inside package.json and install @angular/core@18 @angular/cli@18
with the ng update command i shared you earlier it should work. But you are more likely under a corporate firewall (besides being weird installing angular-cli globally works). I'd get it fixed by asking internally.