Please update to the latest version of guess parser (at least 0.4.16 for this fix. 0.4.17 is latest and may contain features that interest you as well)
When running the Scully build we have to exclude the AngularJS pages of our Hybrid app from guess parser when scanning for routes. The guess parser fails to exclude the AngularJS pages because guess parser was based on '/'s for file names but Windows uses '\'. Also, it assumed that fully qualified paths started with "/".
I created a PR to merge to guess parser which fixed these issues and was accepted. (0.4.16).
https://github.com/guess-js/guess/pull/347
Add a list of excluded files with the windows format (eg "c:\\my-example\\repo\\some\\file.ts").
Guess parser will not exclude the file.
Angular Version:
Angular CLI: 8.0.6
Node: 12.16.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, upgrade
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.6
@angular-devkit/build-angular 0.800.6
@angular-devkit/build-optimizer 0.800.6
@angular-devkit/build-webpack 0.800.6
@angular-devkit/core 8.0.0
@angular-devkit/schematics 8.0.0
@angular/cli 8.0.6
@ngtools/webpack 8.0.6
@schematics/angular 8.0.0
@schematics/update 0.800.6
rxjs 6.4.0
typescript 3.4.5
webpack 4.30.0
Scully Version:
"@scullyio/init": "0.0.23",
"@scullyio/ng-lib-v8": "0.0.20",
"@scullyio/scully": "0.0.79",
C:\git\website\beyond\WebApp\src\core\routing\beyond-page-route.factory.ts is in the excludedFiles property of the scully config.
Finding all routes in application.
traversing app for routes
Error: Module C:\git\website\beyond\WebApp\src\core\routing\beyond-page-route.factory.ts belongs to more than one module: C:\git\website\src\app\app.module.ts, C:/git/website/src/app/home/home.module.ts, C:/git/website/src/app/account-hub/account-hub.module.ts, C:/git/website/src/app/aquasoft/aquasoft.module.ts, C:/git/website/src/app/brand-choice/brand-choice.module.ts, C:/git/website/src/app/dashboard/dashboard.module.ts, C:/git/website/src/app/exam/exam.module.ts, C:/git/website/src/app/patient/patient-name.module.ts, C:/git/website/src/app/thank-you/thank-you.module.ts, C:/git/website/src/app/insurance/insurance.module.ts, C:/git/website/src/app/rebate/rebate.module.ts
at getModuleEntryPoint (C:\git\website\node_modules\guess-parser\dist\guess-parser\index.js:248:15)
at C:\git\website\node_modules\guess-parser\dist\guess-parser\index.js:606:30
at visitTopLevelRoutes (C:\git\website\node_modules\guess-parser\dist\guess-parser\index.js:578:13)
at visitNodes (C:\git\website\node_modules\typescript\lib\typescript.js:16514:30)
at Object.forEachChild (C:\git\website\node_modules\typescript\lib\typescript.js:16681:24)
at NodeObject.forEachChild (C:\git\website\node_modules\typescript\lib\typescript.js:120242:23)
at visitTopLevelRoutes (C:\git\website\node_modules\guess-parser\dist\guess-parser\index.js:581:15)
at visitNode (C:\git\website\node_modules\typescript\lib\typescript.js:16505:24)
at Object.forEachChild (C:\git\website\node_modules\typescript\lib\typescript.js:16599:21)
at NodeObject.forEachChild (C:\git\website\node_modules\typescript\lib\typescript.js:120242:23)
We encountered a problem while reading the routes from your applications source.
This might happen when there are lazy-loaded routes, that are not loaded,
Or when there are paths we can not resolve statically.
Check the routes in your app, rebuild and retry.
(You can inspect the error by passing the --showGuessError flag
Not sure if this should have been a bug or a feature request. Let me know what you need from me.
cc: @aaronfrost
Hi, in case this helps, this was the pull request I made which lead to the new release of guess-parser: https://github.com/guess-js/guess/pull/352
Hello @ spencerb02 thanks for this ... We update the GuessJS version, in the next version of Scully it will be available (we will publish today) 馃槃
Most helpful comment
Hello @ spencerb02 thanks for this ... We update the GuessJS version, in the next version of Scully it will be available (we will publish today) 馃槃