"There are multiple entries in the deeplink config with the segment of main" error after latest update

I get the following error after latest update to @ionic/app-scripts : 3.0.0 and ionic-angular 3.7.0


[INFO] Starting app-scripts server: --address --port 8100 --livereload-port 35729 --dev-logger-port 53703 
       --consolelogs - Ctrl+C to cancel
[09:42:02]  watch started ... 
[09:42:02]  build dev started ... 
[09:42:02]  clean started ... 
[09:42:02]  clean finished in less than 1 ms 
[09:42:02]  copy started ... 
[09:42:03]  deeplinks started ... 
Error: There are multiple entries in the deeplink config with the segment of main
    at new BuildError (/app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at /app/node_modules/@ionic/app-scripts/dist/deep-linking.js:57:21
npm ERR! errno 1
npm ERR! HelloSinglesApp@0.1.0 start: `ionic serve -c`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the HelloSinglesApp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2017-09-29T07_42_03_283Z-debug.log

if anyone have any ideo about what the problem can be, please share :slight_smile:


Ok, it was a simple problem with my @IonicPage() params, just updated

@IonicPage() in my Main class


@IonicPage({ name: "main", segment: "app" )

to avoid the conflict

this worked fine till in previous versions of app-scripts, i guess the check for deeplink conflicts have been changed

anyway, that is the solution.

1 Like

The segment name defaults to the file name - not the class name - the docs appear to be wrong. Having unique file names fixes as well. I opened a PR to fix the docs. https://github.com/ionic-team/ionic/pull/13022

Yeah, I had 2 main.ts in my project. Thanks!

where can i found the main class ? bcoz it my main.ts doesnt have the @IonicPage


In your application there two same class name in page folder. I faced this issue because i copy home page for back since that i was getting this error. so i deleted copy page component, now it is working.