sample code misleading ?

I was trying to follow the instructions on the uploader at this link

https://ej2.syncfusion.com/16.1.37/angular/documentation/uploader/getting-started.html

However, if I use that code, I get the error

Type UploaderComponent in <path>node_modules/@syncfusion/ej2-ng-inputs/src/uploader/uploader.component.d.ts is part of the declarations of 2 modules: NioWidgetsModule in <path>/widgets.module.ts and UploaderModule in <path>/node_modules/@syncfusion/ej2-ng-inputs/src/uploader/uploader.module.d.ts!

If I modify the code to read 

import { UploaderModule } from '@syncfusion/ej2-ng-inputs';

@NgModule({
imports: [CommonModule, UploaderModule],

then a build works just fine.

However, I am trying to wrap the uploaded in a angular library using v6 : when I import my wrapper into another project I get this error

ERROR in node_modules/@nodeableio/ngx-ui/lib/widgets/components/upload/upload.component.d.ts(2,26): error TS2307: Cannot find module '@syncfusion/ej2-base'.
node_modules/@nodeableio/ngx-ui/lib/widgets/components/upload/upload.component.d.ts(3,35): error TS2307: Cannot find module '@syncfusion/ej2-ng-inputs'.

what am I missing ?





1 Reply

KR Karthik Ravichandran Syncfusion Team June 6, 2018 05:33 PM UTC

Hi Julian, 
 
Thanks for contacting Syncfusion support. 
 
Query 1: “I was trying to follow the instructions on the uploader at this link
https://ej2.syncfusion.com/16.1.37/angular/documentation/uploader/getting-started.html  However, if I use that code, I get the error”
 
 
 
We will check the getting started of uploader component once again, and correct the documentation in our side and let you know once it has been published in online. 
 
 
Query 2: However, I am trying to wrap the uploaded in a angular library using v6 : when I import my wrapper into another project I get this error 
 
Based on your provided details, we suspect that the node_modules is not configured properly in your second project. So, please ensure that whether uploader’s dependent packages are referred properly in your application. 
Please refer to the below documentation link for dependent library details. 
 
If you still facing the same issue, could you please share package.json file of your second application if possible. This will help us to provide the solution at earliest. 
 
Regards, 
Karthik R 


Loader.
Up arrow icon