Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Property 'dragAreaClass' does not exist on type 'FileUploaderComponent' #253

Open
subotic opened this issue May 25, 2018 · 6 comments
Open
Assignees
Labels

Comments

@subotic
Copy link
Member

subotic commented May 25, 2018

When building for production, I get the following error:

ERROR in src/app/view/modules/form/file-uploader/file-uploader.component.html(4,14): : Property 'dragAreaClass' does not exist on type 'FileUploaderComponent'.

The build command used: ng build --prod --build-optimizer

Any ideas?

@subotic subotic added the bug label May 25, 2018
@kilchenmann
Copy link
Member

There are a lot of errors in salsah-file-uploader component right now. This is the reason, why we don't use it anywhere. But I think when you want to build the salsah-app it compiles every file regardless of whether they are implemented or not. Does it worked before? This would be strange, because I didn't work on the file-uploader.

And when I run ng build --prod --build-optimizer in develop branch I get a different error:

ERROR in : Unexpected value 'MatJDNConvertibleCalendarDateAdapterModule in /Users/ak/www/salsah/node_modules/jdnconvertiblecalendardateadapter/dist/index.d.ts' imported by the module 'AppModule in /Users/ak/www/salsah/src/app/app.module.ts'. Please add a @NgModule annotation.

So, I can't reproduce your error. We should have a look on it on Monday!

@subotic
Copy link
Member Author

subotic commented May 26, 2018

Ah yes, the MatJDNConvertibleCalendarDateAdapterModule error stems from JDNConvertibleCalendarDateAdapterModule bug, which apparently wasn't fixed.

There is a workaround. You would need to copy manually index.d.ts to node_modules/jdnconvertiblecalendardateadapter/dist/index.d.ts.

And index.d.ts:

import {NgModule} from '@angular/core';
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_PROVIDER} from '@angular/material';
import {MAT_JDN_DATE_FORMATS} from 'jdnconvertiblecalendardateadapter/dist/JDNConvertibleCalendar-date-formats';
import {JDNConvertibleCalendarDateAdapter} from 'jdnconvertiblecalendardateadapter';

@NgModule({
    providers: [
        MAT_DATE_LOCALE_PROVIDER,
        {provide: DateAdapter, useClass: JDNConvertibleCalendarDateAdapter, deps: [MAT_DATE_LOCALE]}
    ]
})
export declare class JDNConvertibleCalendarDateAdapterModule {
}

@NgModule({
    imports: [JDNConvertibleCalendarDateAdapterModule],
    providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_JDN_DATE_FORMATS}],
})
export declare class MatJDNConvertibleCalendarDateAdapterModule {
}
export { JDNConvertibleCalendarDateAdapter } from './JDNConvertibleCalendarDateAdapter';

@subotic
Copy link
Member Author

subotic commented May 26, 2018

After that, the error I get should surface.

@subotic
Copy link
Member Author

subotic commented May 26, 2018

The JDNConvertibleCalendarDateAdapterModule issue: dhlab-basel/JDNConvertibleCalendarDateAdapter#5. Maybe you know how to fix it.

@subotic
Copy link
Member Author

subotic commented May 28, 2018

@kilchenmann do we need the file-uploader component? Can I delete it?

@kilchenmann
Copy link
Member

kilchenmann commented May 28, 2018

Right now the file-uploader doesn't work. So we don't use it anywhere and yes you can remove it. I have to create an own file-uploader module anyway.

Tobias mentioned something about fixing the JDNConvertibleCalendarDateAdapterModule. We have to build the module the correct way.

@kilchenmann kilchenmann self-assigned this May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants