question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modules not exported inline (export class MyModule) are not recognized by language service

See original GitHub issue

os - Ubuntu 20.04 nodejs - 16.1.0

Steps to reproduce the behavior:

  1. Download problem.zip
  2. npm install
  3. Install ext. @angular/language-service for VSCode
  4. Open project with VSCode

latest version of extention - @angular/language-service for VSCode problem.zip - project

When using this configuration I got errors:

in src/app/dashboard/dashboard.component.html

'drawer-component' is not a known element:
1. If 'drawer-component' is an Angular component, then verify that it is part of this module.
2. If 'drawer-component' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.ngtsc(-998001)

in src/shared/drawer-component/index.ts

Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?(-996002)

Settings:

Screenshot from 2021-05-17 10-43-43 Screenshot from 2021-05-17 10-43-49

Problem: Screenshot from 2021-05-17 10-39-23 Screenshot from 2021-05-17 10-39-27

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
atscottcommented, Jun 1, 2021

This will be addressed by #42184. It might miss the release this week but will definitely be in by next week.

1reaction
alxhubcommented, May 19, 2021

Transferring this to angular/angular as this is fundamentally a compiler bug (we need to be smarter about detecting “exported” components).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to export a class in a PowerShell v5 module
It doesn't work: Import-Module : The member 'ScriptsToProcess' in the module manifest is not valid: The path cannot be processed because it resolved...
Read more >
16. Modules - Exploring JS
Can I use destructuring in an import statement? 16.9.5. Are named exports necessary? Why not default-export objects? 16.9.6. Can I eval() the code ......
Read more >
Using ECMAScript modules (ESM) with Node.js
Learn about using ES modules in Node.js today and get a closer look at how you can migrate your codebase to make use...
Read more >
export - JavaScript - MDN Web Docs
You can have multiple named exports per module but only one ... As a special case, functions and classes are exported as declarations,...
Read more >
in C++ experimental module, the LAST inline variable is ...
export module MyModule ; export namespace myModule { inline int myModuleVar1 = 0; inline int ... error C2653: 'myModule': is not a class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found