Unexpected value 'FileUploadModule' imported by the module 'UploaderModule' #426
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Getting the above error after moving from RC4 to release. Here is link to my stackoverflow incident
Any ideas?
UPDATE: Inspired by this reverse issue I copied node_module/ng2-file-upload to the directory that this component is in and changed my import to be ...
import {FileUploadModule} from './ng2-file-upload/ng2-file-upload.js'...and it worked! Is there a problem with the way you are exporting this module that it has to be relative?
I tried importing it as a file rather than a module but leaving it in place, changed my import to this ...
import {FileUploadModule, FileUploader} from '../../../jspm_packages/npm/ng2-file-upload@1.1.0/ng2-file-upload';...and I'm back to the error again.
I then symlinked in my project root as ng2-file-upload to ../../../jspm_packages/npm/ng2-file-upload@1.1.0/ng2-file-upload and changed my import to...
import {FileUploadModule, FileUploader} from '../../../ng2-file-upload/ng2-file-upload';...and it worked fine!
So I think jspm/systemjs knows that the direct path is actually an npm package and must try to import it differently than straight up as a file. And as a file it loads the module correctly.
Just for the record, since I didn't specify above, I am using a pure js solution (yes, I am bucking the trend, but not a Typescript fan).
I am getting this error too when using ng-xi18n (Angular 2 final --this is the utility to perform internationalization). All Typescript here.
I changed
import { FileUploadModule, FileUploader } from 'ng2-file-upload/ng2-file-upload';
to
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
and the error went away. I guess the docs need to be updated.