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

Not working via npm? #49

Open
grofit opened this issue Jan 15, 2016 · 3 comments
Open

Not working via npm? #49

grofit opened this issue Jan 15, 2016 · 3 comments

Comments

@grofit
Copy link

grofit commented Jan 15, 2016

I could have sworn this was working last time I used it, but if you basically do:

var ko = require("knockout-es5");

It does not seem to expose the main methods, like track etc. Is this the correct way to use it in the commonjs world? (Let us not get onto the conversation as to why I am having to use knockout on the server side).

@grofit
Copy link
Author

grofit commented Jan 18, 2016

After some investigation it seems to be down to the weakmap shim, if I remove that it works fine in a node environment however I am not sure if there is a reason why it is setup like it is, almost all other knockout stuff do the UMD dance at the top before loading whereas this does not.

If anyone can give guidance I am more than happy to wrap it so it exports correctly, alternatively it may just be linked to:

#41

I do not know who the owner is as its down as @GreenJello but I cannot see any contributors who match that persons details.

https://www.npmjs.com/package/knockout-es5

@grofit
Copy link
Author

grofit commented Jan 18, 2016

After playing it seems if I basically put the dependency as the github repo rather than the npm module it works fine:

"knockout-es5": "SteveSanderson/knockout-es5"

So this can be used as a workaround (again I know it will be rare anyone uses knockout on the server side).

@blazkovicz
Copy link

I use knockout on client, but prefer npm and not bower modules if available.

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

2 participants