Closed fknop closed 7 years ago
Can you produce a repository that duplicates this?
I'm not able to reproduce it in a new project, I'll come back to you if I succeed to reproduce it.
This may be related to #36?
@petebacondarwin Could be but without a solid repo it is hard to be sure.
Please reopen if you can still reproduce this in 0.1.0
I have the same error:
It happens with those component you are importing by their modules, so in my ngModule I import XModule and I use XComponent inside of my new component and it triggers that error as it doesn't recognize that the component is coming from the imported module.
version 0.1.2
@ialex90 Can you open a separate issue and attach either a .zip file that reproduces this or a github project I can clone?
@chuckjaz I've tried this plugin in 2 different environments with the same result. I think if you import a module and try to use the component, will see the error. Haven't this happened to you in the latest version? It's a very common scenario and I've faced on Windows & MacOS. Do you need me to recreate this scenario?
This is not the same issue as above which is why I would like a new issue open. Second, I always want to be very clear about what issue is being resolved. Having a repro attached to the bug helps with that immensely event if you believe the repro is trivial, please attach one.
Also, note that structural changes (such as importing and modifying a module) take a few seconds to propagate because we are deferring some expensive calculations. Try modifying the source reporting the error a 5 to 10 seconds after you made the @NgModule
change.
I have been creating a small project with a single ngmodule exported and imported and it works well with the plugin. I got the update today too, not sure if it's because of that, anyway, in the big project I'm working on, even with the newest version, it does trigger that error that I showed above and I can't replicate a scenario with 30-40 module just to see if triggers the error or not.
I will wait if someone else has the same error or maybe in a near future I won't see those errors and will be able to use the plugin.
I'm seeing this issue in v0.1.3. Everything works for me (compiles/runs etc), but my shared module components are still getting "not known element" errors. I've commented on #36
Having this issue in 0.1.9. Only seems to be affecting library components referenced from outside of the app's project structure, even when both project folders are loaded into vs code. e.g. referencing from "projects/shared-lib/src/public_api" shows no error, referencing from "../ngls-issue-lib/projects/ext-lib/src/public_api" can't resolve the component and shows an error.
The app builds and runs without problems, displays all components.
Reproduced in sample project at public repo: https://github.com/rweads0520/ngls-issue.git
I'm also having a same issue
i'm also having this issue while using a third party module angular2gridster
on my ionic4 project.
Check to see if the component was imported and added to @NgModule declarations in your app.module.ts file. You may have to manually do the following:
Import your component import { HomeComponent } from './home/home.component';
add it to the @NgModule declarations @NgModule({ declarations: [ AppComponent, HomeComponent ]
I'm still having this issue vscode version 1.27.2
,
I'd like to note that my app is working fine. and it's not a 3rd party component.
Add
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
on component module
Having that on mac Catalaina 10.15.2 with angular material components that I am exporting from the custom angular material module that lives in my shared library in my monorepo
VScode details: Version: 1.41.1 Commit: 26076a4de974ead31f97692a0d32f90d735645c0 Date: 2019-12-18T14:57:51.166Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Darwin x64 19.2.0
@carlosearaujo
Add
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
on component module
By adding schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
that to my material module didn't fix the problem.
UPDATE: Seems like there is an issue with language-service https://github.com/angular/vscode-ng-language-service/issues/340
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.
When a custom component is imported via a module, it cannot be found inside a template, it shows: