DSpace 7 - Custom theme missing typescript compilation

342 views
Skip to first unread message

Seun Adewoye

unread,
May 27, 2022, 3:43:59 PM5/27/22
to DSpace Technical Support
Hello everyone. I require support. I'd like to personalize the DSpace 7-footer. I did this by copying src/app/footer to my custom theme directory /src/themes/mytheme/app/footer. My modifications are unsuccessful. When I run dspace in developer mode, I keep getting the following error:


WARNING in ./src/themes/mytheme/app/footer/footer.component.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /opt/dspace-7/client/src/themes/mytheme/app/footer/footer.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at AngularCompilerPlugin.getCompiledFile (/opt/dspace-7/client/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:949:23)
    at /opt/dspace-7/client/node_modules/@ngtools/webpack/src/loader.js:43:31
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

WARNING in /opt/dspace-7/client/src/app/item-page/edit-item-page/item-delete/item-delete.component.ts depends on 'rxjs/internal/BehaviorSubject'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

amtuan...@gmail.com

unread,
Apr 24, 2023, 1:22:01 PM4/24/23
to DSpace Technical Support
I am getting the same errors whenever I try to change the footer following the instructions. Anyone able to solve this yet? Thanks!

DSpace Technical Support

unread,
May 1, 2023, 10:38:04 AM5/1/23
to DSpace Technical Support
Hi,

We have instructions for changing the footer available at:

If these instructions are not working for you, we'll need you to share (to this list) more information on your setup.

Tim

Jeremiah Kellogg

unread,
May 11, 2023, 5:25:52 PM5/11/23
to DSpace Technical Support
I'm having this same issue.  I'm wondering if it's because I'm using the dspace theme?  That particular theme didn't have a footer directory in the dspace/app/ directory, so I created it and copied all footer.component.ts, footer.component.html, and footer.component.scss files from custom/app/footer directory (from the custom theme).  I also tried copying all those files from the dspaceuihome/src/app/footer directory to the dspace/app/footer directory.  I'm using the dev environment and I keep getting the same angular error:
Compiled with problems:X

ERROR in ./src/themes/dspace/app/footer/footer.component.ts

Module build failed (from ./node_modules/@ngtools/webpack/src/index.js): Error: /home/jkellogg/dspace-frontend/src/themes/dspace/app/footer/footer.component.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. at /home/jkellogg/dspace-frontend/node_modules/@ngtools/webpack/src/ivy/loader.js:64:26


I don't know what this means.  I tried adding the path to the dspace themes footer.component.ts file in the tsconfig.app.json file in the ui home directory and I still get this error.  I've followed the instructions that are linked to, so I'm baffled as to why this is happening.

Jeremiah Kellogg

unread,
May 15, 2023, 4:14:12 PM5/15/23
to DSpace Technical Support
Looks like my problem was I didn't read the section on adding components.  Maybe someone should add a note to the footer customization section letting people know to check the section on adding new components.  In any case, I followed the directions in the adding new components section and now everything is working as should.
Reply all
Reply to author
Forward
0 new messages