Thanks, @dinos! I never really tracked it down in the code, just noticed the behaviour.
Yes, I was too lazy to adjust the server links too, so just copied all the folders into the client folder and adjusted the client/style entry files. Obviously if you wanted to go this route you’d need to restructure properly, but for testing purposes this was good for me :>
Yeah, since this todo is an example of a … not very trivial large app… with a team… I currently investigate if its enough to have components and screens under a clients/ folder. But as beniot, would be grade if you could chip in on the issue above at metoer and stress, that the current watcher behavior feels like a hack.
Has anyone had good luck enabling decorators using this?
I tried by adding the transform-decorators plugin but it always complains about adding the decorator plugin before the class plugin!
While processing files with gadicc:ecmascript-hot (for target web.browser):
framework/client/components/baseComponent.jsx:10:4: /framework/client/components/baseComponent.jsx: Method has decorators, put the decorator plugin before the classes one.
No longer auto-populate babelrc presets with meteor, to allow other
plugins to be loaded before those in the preset. If you don’t already
have a .babelrc, one will be created for you. If you do, ensure you
have { "presets": "meteor" }. Also, npm install --save-dev babel-preset-meteor.
@dortega, this release should solve your issue, let me know. I had to use transform-decorators-legacy and I guess you saw the notes about this.
@dinos, sure, will chime in after 1.3 final is released, which seems like any day now. This would be great for all of us
Works with Meteor 1.3 rc.4 - rc.13 and 1.3 (final)
Fixed a bunch of issues that broke production and bundling:
Don’t transform stateless components, don’t connect to Mongo,
don’t replace modules-runtime, don’t block HCPs, and lastly,
use NODE_ENV as part of the babel cache hash.
Use JSON5 for parsing .babelrc, just like babel does.
This allows for comments, etc.
What OS are you on? How are you launching Meteor? If you run Meteor without this package, and type meteor mongo --url in your project directory from another terminal, what does it say?
OSX 10.11.4, launching with just meteor. It’s a bare Mantra app, nothing in it.
Two scenario’s:
Start meteorwithoutgadicc:ecmascript-hot@0.0.14-rc.12 and run meteor mongo --url in another terminal. Result: mongodb://127.0.0.1:3001/meteor.
Start meteorwithgadicc:ecmascript-hot@0.0.14-rc.12. It won’t start because of that error. Then run meteor mongo --url in the same terminal. Result: mongodb://127.0.0.1:3001/meteor.
[gadicc:hot] Failed to connect to your Mongo database on "mongodb://localhost:3001/meteor". Try MONGO_URL environment variable or "-p PORT" when running Meteor.
/Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/lib/server.js:236
process.nextTick(function() { throw err; })
^
Error: MongoError: getaddrinfo ENOTFOUND
at packages/gadicc_babel-compiler-hot.js:155:11
at /Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/lib/mongo_client.js:276:20
at /Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/lib/db.js:224:14
at [object Object].<anonymous> (/Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/lib/server.js:234:9)
at [object Object].g (events.js:180:16)
at [object Object].emit (events.js:98:17)
at [object Object].<anonymous> (/Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:269:68)
at [object Object].g (events.js:180:16)
at [object Object].emit (events.js:98:17)
at [object Object].<anonymous> (/Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:81:12)
at [object Object].g (events.js:180:16)
at [object Object].emit (events.js:98:17)
at Socket.<anonymous> (/Users/Sander/.meteor/packages/gadicc_ecmascript-hot/.0.0.14-rc.12.qnvn1m++os+web.browser+web.cordova/plugin.compile-ecmascript-hot.os/npm/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/meteor/gadicc_babel-compiler-hot/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:124:49)
at Socket.g (events.js:180:16)
at Socket.emit (events.js:95:17)
at net.js:834:16
at process._tickCallback (node.js:458:13)
Usually systems resolve ‘127.0.0.1’, via an entry in the hosts file (apparently in /private/etc/hosts on OSX), i.e. if you ping localhost it should resolve to 127.0.0.1. I guess this isn’t guaranteed on OSX, so I’ll just use 127.0.0.1 directly in the next release (or I guess, be smarter about checking what Meteor is using).
Thanks for the heads up, will address this in next release.
No, this is an error on my side… I just realized I renamed /etc/hosts for a completely different reason. Things work again, no need for you to change it.
Although I don’t know why it didn’t work for @boormat.
I’m attempting to use this package right now with the latest version of the Meteor 1.3 RC, and I’m getting the following error in browser console when loading up my app.
Uncaught TypeError: modulesRuntime.meteorInstall._expose is not a function
As for packages I have installed, I’m using yours as a replacement for ecmascript, and I’m just using the .babelrc that’s generated by your package, I didn’t have one pre-written.
I’m using react, redux, react-redux, and react-router, as far as NPM stuff goes, but I wouldn’t think that would have anything to do with this, I feel like I might be doing something wrong, but not sure what. If you have any questions to ask as far as diagnostics go, let me know and I’ll respond ASAP. I’d like to get this working for sure.
All of my components are authored using the React.createClass method, not by extending their class, or whatever that method is.