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 SortablejsModule imported by module #19

Closed
GiuseppePiscopo opened this issue Dec 26, 2016 · 7 comments
Closed

Unexpected value SortablejsModule imported by module #19

GiuseppePiscopo opened this issue Dec 26, 2016 · 7 comments

Comments

@GiuseppePiscopo
Copy link
Contributor

GiuseppePiscopo commented Dec 26, 2016

Hi there. Thanks for this library, first of all.

I'm finding an issue I can't resolve when building a project in AOT mode (everything goes fine in JIT build). Not sure this is the same as #18 , error messages seem different. At compile time I get an error:

Error: Unexpected value 'SortablejsModule' imported by the module 'MyCustomModule'
at xxxx\node_modules@angular\compiler\bundles\compiler.umd.js:17768:46
....

This is with webpack 2.1.0-beta.25 and angular 2.3.1. Tried upgrading to latest angular 2.4.1 and error is still there, just reworded:

Unexpected value 'SortablejsModule in xxxx/node_modules/angular-sortablejs/index.d.ts' imported by the module 'MyCustomModule in yyyy/my-module.ts'

I've met similar issues with other libraries I was depending on, and very often they are related to the library not being compiled through ngc (or Angular CLI), so there's no metadata.json generated file. See e.g. for ng2-bs3-modal, angular-pipes, or others. Other times it can be also due to some provider not being correctly exposed for AOT, as in ng2-redux

Has anyone met this problem before? Sorry for not providing a repro project yet, hopefully the references might give some hint to start.

@smnbbrv
Copy link
Member

smnbbrv commented Dec 27, 2016

hi @GiuseppePiscopo

could it also be connected to #18 ? The ngc is a good hint, probably fixes them both

@GiuseppePiscopo
Copy link
Contributor Author

Would you consider a PR, even if partial and work-in-progress, to start moving to AOT build with ngc?

@smnbbrv
Copy link
Member

smnbbrv commented Dec 27, 2016

Yes of course, PRs always welcome :) We can try it on a separate branch with prerelease versions that you can test it with the real projects

@GiuseppePiscopo
Copy link
Contributor Author

GiuseppePiscopo commented Dec 27, 2016

Please have a (thorough?) look at #20 .

Contrary to what I said before, apparently that is not so partial. I tried in an existing project, depending on this library, by manually swapping downloaded node_modules\angular-sortablejs with the output from npm pack. All goes fine both at AOT-compile time and runtime.

@smnbbrv
Copy link
Member

smnbbrv commented Dec 28, 2016

Hi @GiuseppePiscopo @BrainCrumbz

the version 1.3.0-0 is published. I tried it with my projects, seems to work nicely.

Could you test it with yours and let me know whether I can create a normal 1.3.0?

@BrainCrumbz
Copy link

BrainCrumbz commented Dec 28, 2016

Green light for me & my team

@smnbbrv
Copy link
Member

smnbbrv commented Dec 28, 2016

@BrainCrumbz thank you guys for the effort and improvements you've done! Now it is published as 1.3.0

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