Home
Support Forums

Error in deploy please help

Hi,

my app: aboca-data-ngapp.netlify.app

3:12:54 PM: ./src/app/app-routing.module.ts:2:0-60 - Error: Module not found: Error: Can’t resolve ‘./pages/home/home.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app-routing.module.ts:3:0-69 - Error: Module not found: Error: Can’t resolve ‘./pages/clienti/clienti.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app-routing.module.ts:4:0-88 - Error: Module not found: Error: Can’t resolve ‘./pages/page-not-found/page-not-found.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app-routing.module.ts:5:0-66 - Error: Module not found: Error: Can’t resolve ‘./pages/utenti/utenti.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app.module.ts:7:0-60 - Error: Module not found: Error: Can’t resolve ‘./pages/home/home.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app.module.ts:8:0-69 - Error: Module not found: Error: Can’t resolve ‘./pages/clienti/clienti.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app.module.ts:9:0-88 - Error: Module not found: Error: Can’t resolve ‘./pages/page-not-found/page-not-found.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app.module.ts:12:0-61 - Error: Module not found: Error: Can’t resolve ‘./layout/menu/menu.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: ./src/app/app.module.ts:13:0-66 - Error: Module not found: Error: Can’t resolve ‘./pages/utenti/utenti.component’ in ‘/opt/build/repo/src/app’
3:12:54 PM: Error: src/app/app-routing.module.ts:3:29 - error TS2307: Cannot find module ‘./pages/home/home.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 3 import {HomeComponent} from “./pages/home/home.component”;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app-routing.module.ts:4:32 - error TS2307: Cannot find module ‘./pages/clienti/clienti.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 4 import {ClientiComponent} from “./pages/clienti/clienti.component”;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app-routing.module.ts:5:37 - error TS2307: Cannot find module ‘./pages/page-not-found/page-not-found.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 5 import {PageNotFoundComponent} from “./pages/page-not-found/page-not-found.component”;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app-routing.module.ts:6:31 - error TS2307: Cannot find module ‘./pages/utenti/utenti.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 6 import {UtentiComponent} from “./pages/utenti/utenti.component”;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.component.html:3:5 - error NG8001: ‘app-menu’ is not a known element:
3:12:54 PM: 1. If ‘app-menu’ is an Angular component, then verify that it is part of this module.
3:12:54 PM: 2. If ‘app-menu’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
3:12:54 PM:
3:12:54 PM: 3
3:12:54 PM: ~~~~~~~~~~
3:12:54 PM:
3:12:54 PM: src/app/app.component.ts:5:16
3:12:54 PM: 5 templateUrl: ‘./app.component.html’,
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM: Error occurs in the template of component AppComponent.
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.component.html:54:15 - error NG8001: ‘router-outlet’ is not a known element:
3:12:54 PM: 1. If ‘router-outlet’ is an Angular component, then verify that it is part of this module.
3:12:54 PM: 2. If ‘router-outlet’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
3:12:54 PM:
3:12:54 PM: 54
3:12:54 PM: ~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM: src/app/app.component.ts:5:16
3:12:54 PM: 5 templateUrl: ‘./app.component.html’,
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM: Error occurs in the template of component AppComponent.
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.module.ts:7:31 - error TS2307: Cannot find module ‘./pages/home/home.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 7 import { HomeComponent } from ‘./pages/home/home.component’;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.module.ts:8:34 - error TS2307: Cannot find module ‘./pages/clienti/clienti.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 8 import { ClientiComponent } from ‘./pages/clienti/clienti.component’;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.module.ts:9:39 - error TS2307: Cannot find module ‘./pages/page-not-found/page-not-found.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 9 import { PageNotFoundComponent } from ‘./pages/page-not-found/page-not-found.component’;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.module.ts:12:31 - error TS2307: Cannot find module ‘./layout/menu/menu.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 12 import { MenuComponent } from ‘./layout/menu/menu.component’;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.module.ts:13:33 - error TS2307: Cannot find module ‘./pages/utenti/utenti.component’ or its corresponding type declarations.
3:12:54 PM:
3:12:54 PM: 13 import { UtentiComponent } from ‘./pages/utenti/utenti.component’;
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: Error: src/app/app.module.ts:23:17 - error NG1010: Value at position 1 in the NgModule.declarations of AppModule is not a reference
3:12:54 PM: Value could not be determined statically.
3:12:54 PM:
3:12:54 PM: 23 declarations: [
3:12:54 PM: ~
3:12:54 PM: 24 AppComponent,
3:12:54 PM: ~~~~~~~~~~~~~~~~~
3:12:54 PM: …
3:12:54 PM: 29 UtentiComponent
3:12:54 PM: ~~~~~~~~~~~~~~~~~~~
3:12:54 PM: 30 ],
3:12:54 PM: ~~~
3:12:54 PM:
3:12:54 PM: src/app/app.module.ts:25:5
3:12:54 PM: 25 HomeComponent,
3:12:54 PM: ~~~~~~~~~~~~~
3:12:54 PM: Unknown reference.
3:12:54 PM:
3:12:54 PM:
3:12:54 PM:
3:12:54 PM: ​
3:12:54 PM: ────────────────────────────────────────────────────────────────
3:12:54 PM: “build.command” failed
3:12:54 PM: ────────────────────────────────────────────────────────────────
3:12:54 PM: ​
3:12:54 PM: Error message
3:12:54 PM: Command failed with exit code 1: ng build --configuration production
3:12:54 PM: ​
3:12:54 PM: Error location
3:12:54 PM: In Build command from Netlify app:
3:12:54 PM: ng build --configuration production
3:12:54 PM: ​
3:12:54 PM: Resolved config
3:12:54 PM: build:
3:12:54 PM: base: /opt/build/repo
3:12:54 PM: command: ng build --configuration production
3:12:54 PM: commandOrigin: ui
3:12:54 PM: publish: /opt/build/repo/dist/AbocaDataNGAPP
3:12:54 PM: publishOrigin: ui
3:12:54 PM: Caching artifacts
3:12:54 PM: Started saving node modules
3:12:54 PM: Finished saving node modules
3:12:54 PM: Started saving build plugins
3:12:54 PM: Finished saving build plugins
3:12:54 PM: Started saving pip cache
3:12:55 PM: Finished saving pip cache
3:12:55 PM: Started saving emacs cask dependencies
3:12:55 PM: Finished saving emacs cask dependencies
3:12:55 PM: Started saving maven dependencies
3:12:55 PM: Finished saving maven dependencies
3:12:55 PM: Started saving boot dependencies
3:12:55 PM: Finished saving boot dependencies
3:12:55 PM: Started saving rust rustup cache
3:12:55 PM: Finished saving rust rustup cache
3:12:55 PM: Started saving go dependencies
3:12:55 PM: Finished saving go dependencies
3:12:58 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:12:58 PM: Creating deploy upload records
3:12:58 PM: Failing build: Failed to build site
3:12:58 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
3:12:58 PM: Finished processing build request in 2m18.854858695s

I tried CI= npm run build but nothing

Thanks in advance

Hi @loremerca,

Could you share your repo?

Ok I make repo public, it’s enoght?

Thanks for checking. Once you make the repo public, you will still have to link it in this thread so that we can see it!

As you are likely to continue debugging, I also recommend checking out this Support Guide. It contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: We also recommend trying to search the forums with the build error you encountered - it’s likely that a fellow Forums member has encountered a similar problem in the past.

Good morning, I’ll check your link. Meanwhile this is my repo GitHub - Aboca-Projects/AbocaDataNGAPP
Thanks in advance

Thanks for sharing the repository @loremerca.

Looking at this part of the deploy log you shared:

in the file src/app/app-routing.module.ts you have the line

import {HomeComponent} from "./pages/home/home.component";

however there is no pages directory inside the app directory, hence resolution of the file fails. There is no pages directory anywhere in your repository.

I committed entire site I didn’t see that files missed. Sorry form my post.