Error message
Error: src/app/test/test.component.ts:8:14 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
Is it missing an @NgModule annotation?
Error code
reason: TestComponent is imported incorrectly in app.module.ts file, so TestModule should be imported
correct import:
Note: a component can only belong to one module. After introducing testcomponent in test.module.ts, testcomponent cannot be imported in declarations in app.module.ts, Otherwise, an error will be reported in the browser!
Read More:
- [Solved] ESlint Create New File Error: Component name “Home” should always be multi-word.
- NPM publish an angular library Error [How to Solve]
- ‘webpack dev server’ is not an internal or external command, nor is it a runnable program or batch file. Solution: error in cnpm run dev:
- Trigger http request when tab page is closed in angular2+ project
- [Solved] component import error is declared in the statement of components
- [Solved] vue-roter 4 Error: Error: Invalid route component/Uncaught (in promise) Error: Invalid route component
- [Solved] Vue3.2 component computed Error: Write operation failed: computed value is readonly
- [Solved] AES encryption in ie11 results in an error (missing ‘)‘
- 9:13 error Component name “home“ should always be multi-word vue/multi-word-component-names
- Golang: How to determine structure whether it is empty
- [Solved] vue error: error Component name “School“ should always be multi-word vue/multi-word-component-names
- [Solved] it only responds to error and does not enter success after AJAX is successfully processed
- [Solved] uni app TypeError: undefined is not an object (evaluating ‘modules[moduleId].call‘) __ERROR
- [Solved] Vue create Create Project Error: command failed: npm install –loglevel error
- Vue Error: component has been registered but not used [Two Methods to Solve]
- [Solved] Angular&CI/CD:Error: initial exceeded maximum budget
- [Solved] Vue eslint Error: Component name “*****“ should always be multi-word
- [Solved] Vue3 Error: Failed to resolve component:xxx
- [Solved] Error:The above error occurred in one of your React components & A component suspended while respondi
- [Solved] Component name “login“ should always be multi-word.