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

working with meteor 1.3 and new npm module system #23

Open
dcsan opened this issue Dec 24, 2015 · 10 comments
Open

working with meteor 1.3 and new npm module system #23

dcsan opened this issue Dec 24, 2015 · 10 comments

Comments

@dcsan
Copy link

dcsan commented Dec 24, 2015

I upgraded to meteor 1.3 and this package stopped working, I guess since they have their own way to work with npm packages now.

handsontable/handsontable#2076

I noticed you bundled a few other files in your package, and that there's something odd about the original package
handsontable/handsontable#2076

I started some discussion here:
https://forums.meteor.com/t/meteor-1-3-early-beta-now-available/14723/113?u=dcsan

@awsp
Copy link
Owner

awsp commented Dec 25, 2015

Thanks for reporting!
Yea, definitely need to work on this package as I believe meteor will be adapting ES2015 syntax for files importing. Haven't got a chance to try out the 1.3 beta yet. Will come back soon after trying the beta. Tho we still have some time from now to the release RC. :-)

@dcsan
Copy link
Author

dcsan commented Dec 25, 2015

so i'm guessing that meteor can't import because there is no 'main' field in the original HOT repo's package.json. Possibly adding a definition there may fix things, but i'm not sure what to define as the 'entry point'.

@dcsan
Copy link
Author

dcsan commented Jan 7, 2016

I notice your package imports a number of things
https://github.com/awsp/handsontable-meteor/blob/master/package.js#L14-L26

so its not using the npm module for HOT?
benjamin from MDG replied about that packaging here
https://forums.meteor.com/t/meteor-1-3-early-beta-now-available/14723/124

but I don't know where the HOT module comes from, I can't see it in npm
https://www.npmjs.com/browse/keyword/handsontable

npm install handsontable/handsontable apparently just pulls it directly from the github repo? I didn't know about that feature of npm

more discussion
handsontable/handsontable#2076 (comment)

@awsp
Copy link
Owner

awsp commented Jan 7, 2016

As far as I am concerned, there is no NPM version of Handsontable. (If I am not mistaken)
HOT is loaded from a Brower version of Handsontable with modification to its source since HOT exposes itself to the window object. That obviously make Meteor complains about Handsontable not found. This package simply modify HOT so it is available to Meteor global scope only.

For Meteor 1.3 where all the export default and import for modules loading take place, I will have to find a way to do that since Handsontable is technically not a NPM module. Tho it is still not sure how meteor will implement for bower package, (if it is the case in webpack, we could have a chance using css loader and import into ES6 script, but it still remains unknown. )

Ideas welcome!

@joaopiopedreira
Copy link

Hi @awsp ,

Just updated my app to meteor 1.3 beta12 and got the errors mentioned above.

Any ideas on when you'll have a workaround for this? My app is in prod with your package (on meteor 1.2.1) but I can't wait to try meteor 1.3.

Many thanks for your help.

@awsp
Copy link
Owner

awsp commented Mar 5, 2016

Okay, seems recently there is a npm version of Handsontable published. Will add it to this package soon. :D
Thanks for reporting!

@awsp
Copy link
Owner

awsp commented Mar 24, 2016

It looks like for meteor 1.3, you don't really need a package to use Handsontable since you could natively import it to your meteor application.

I have created a demo
https://github.com/awsp/handsontable-meteor-1.3-react

Note: I am still figuring out the way to import those assets like css or so in Meteor 1.3.

Hope it helps!

@hyperh
Copy link

hyperh commented Apr 16, 2016

@awsp Thanks for your demo, but I'm still having trouble getting it to work in Meteor 1.3.2. I get the error:

install.js:78 Uncaught Error: Cannot find module 'moment'

I opened an issue here: awsp/handsontable-meteor-1.3-react#1

@awsp
Copy link
Owner

awsp commented Apr 16, 2016

Could you try meteor npm install moment --save and see if it works?

Sent from my iPhone

On Apr 16, 2016, at 1:56 AM, hyperh [email protected] wrote:

@awsp Thanks for your demo, but I'm still having trouble getting it to work. I get the error:

install.js:78 Uncaught Error: Cannot find module 'moment'

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@hyperh
Copy link

hyperh commented Apr 17, 2016

@awsp The issue can be fixed like this.
handsontable/handsontable#3407 (comment)

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

4 participants