-
Notifications
You must be signed in to change notification settings - Fork 80
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
Uncaught TypeError: Cannot read property 'register' of undefined #10
Comments
This appears to be an issue with webpack configuration, as it doesn't happen with brunch. I'm putting this on hold for now, but will look into later as we'll be using torch on a webpack project, and I may learn more about this issue then. |
After further research, it appears that brunch is ill-suited to create NPM packages:
I think this explains why the package works fine in a brunch-managed project, but not a webpack-managed project. If I'm reading the issue correctly, we'll need a different build process to create a fully NPM-compatible package for torch. |
@darinwilson Now that we have integrated Torch with CrossConnect, which uses webpack, did this actually end up being a problem? |
@danielberkompas Sorry I didn't respond to this sooner. Yes, it's still a problem. I had to do some hacking to get it to work with CC. See the PR for torch integration From what I could tell, it seems that creating an NPM package with brunch makes it incompatible with webpack. I'm not 100% sure about that, but other folks reported similar problems. At that point, it became to keep of a rabbit hole to pursue, so I just put some duct tape on the CC JS setup and moved on. |
@danielberkompas I think this may have been fixed by removing the umbrella application. Is that correct? |
I added torch to package.json and installed. It's loading the torch.js but erring on the pickaday import:
![](https://camo.githubusercontent.com/d70a1ea7163497355bbf183c1ed28336293d7ab6463d5acfefaaeeb33252cded/687474703a2f2f642e70722f692f31347439662b)
Using webpack.
It may be due to the fact that moment is an "optionalDependency".
The text was updated successfully, but these errors were encountered: