Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected value 'FileUploadModule' imported by the module 'UploaderModule' #426

Open
crowmagnumb opened this issue Sep 29, 2016 · 4 comments

Comments

@crowmagnumb
Copy link

Getting the above error after moving from RC4 to release. Here is link to my stackoverflow incident
Any ideas?

@crowmagnumb
Copy link
Author

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?

@crowmagnumb
Copy link
Author

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).

@marclerman
Copy link

I am getting this error too when using ng-xi18n (Angular 2 final --this is the utility to perform internationalization). All Typescript here.

@dave9111964
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants