#'"@angular/core"' has no exported member named 'input'.

64 messages · Page 1 of 1 (latest)

compact plume
#

Good evening, Do you know why I cannot use "input"? How can I fix this?
Angular CLI: 17.3.4

cyan fiber
#

Looks like you already have it imprted. Just delete the lower case i input import.

compact plume
tepid mango
#

Version of the CLI doesn't really matter. What is the version of @angular/corethat you have installed?

tepid mango
#

Hm. Should work. Hard to say without further input. Might even just be an IDE glitch.

compact plume
tepid mango
#

Does ng serve or ng build work?

compact plume
#

it works but I recieve an error

tepid mango
#

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.

compact plume
tepid mango
#

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)

tepid mango
#

I use WebStorm

#

But it's not free 😄

compact plume
runic bronze
compact plume
# runic bronze 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

compact plume
tepid mango
#

Are you on Windows? Try importing only input, not Input and input.

compact plume
tepid mango
#

Sorry, I misread the error message. Are you using NPM?

tepid mango
#

Can you please run npm ls @angular/core and show the output?

tepid mango
#

This is very strange. All I can think of is delete node_modules and reinstall 😂

analog inlet
#

ng version will tell you what you exactly have

analog inlet
#

So yeah 17.0.1.

#

Can you give use the package.json ?

compact plume
#

{
"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"
}
}

analog inlet
#

quickest way, delete the node modules and the lock file

compact plume
analog inlet
#

package-lock.json or yarn.lock

compact plume
#

after delete and npm install I receive this error

analog inlet
#

restore your package.json

#

you need to keep it

compact plume
runic bronze
# compact plume

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

compact plume
# runic bronze `input`has been introduced in 17.1, you need to update your angular dependencies...

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)

runic bronze
compact plume
runic bronze
compact plume
runic bronze
compact plume
runic bronze
runic bronze
#

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.

compact plume
runic bronze