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

Language Service reports an unknown component selector #21066

Closed
mlc-mlapis opened this issue Dec 16, 2017 · 3 comments
Closed

Language Service reports an unknown component selector #21066

mlc-mlapis opened this issue Dec 16, 2017 · 3 comments
Assignees
Labels
area: language-service Issues related to Angular's VS Code language service freq1: low P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Milestone

Comments

@mlc-mlapis
Copy link
Contributor

mlc-mlapis commented Dec 16, 2017

I'm submitting a...

[x] Bug report

Current behavior

If a new package / lib is developed (using ng-packagr) and the package wasn't installed yet from npmjs (doesn't exist in node_packages) ... and the following config is used in tsconfig.json instead:

"compilerOptions": {
	"baseUrl": ".",
	...
	"paths": {
		"packagename": ["./packages/packagename/src/index.ts"]
	}
}

then it is possible to compile the app (wrapper during the development phase of the package) as usual but VS Code shows an error message that a selector of a component (from packagename) is an unknown element in a template like ... <component-selector></component-selector> ...:

[Angular]
'component-selector' is not a known element:
1. If 'component-selector' is an Angular component, then verify that it is part of this module.
2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

If the package is installed (npm install packagename) without any changes in the code then the package is correctly recognized and there is no error message.

Expected behavior

Be able to understand that the package is correctly installed and usable even on the base of the correct configuration of "paths" in tsconfig.json. The main point is that during development process of such a package there is nothing to install.

Environment

- Angular version: 5.1.1
- Angular Language Service VS Code Extension: 0.1.7
- TypeScript: 2.4.2
- Browser: all
- Node version: 8.9.1
- Platform:  all
@mlc-mlapis
Copy link
Contributor Author

mlc-mlapis commented Dec 26, 2017

... related to #16382 and #19405

@ngbot ngbot bot added this to the needsTriage milestone Feb 26, 2018
@kyliau kyliau self-assigned this Dec 5, 2018
@kyliau kyliau removed this from the needsTriage milestone Dec 5, 2018
@ngbot ngbot bot added this to the needsTriage milestone Dec 5, 2018
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Dec 6, 2018
@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed severity3: broken labels Oct 1, 2020
@JoostK
Copy link
Member

JoostK commented May 13, 2021

I cannot reproduce in the latest language service (both View Engine and Ivy) so closing as resolved at some time.

@JoostK JoostK closed this as completed May 13, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: language-service Issues related to Angular's VS Code language service freq1: low P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

No branches or pull requests

5 participants