Open tehfailsafe opened 9 years ago
@tehfailsafe, check that you have a misleading comma after package version. Remove that and it should work.
You probably have an old version of this package as line 63 is a comment line on latest package version.
Wow...
I've been getting used to babel/webpack lately where you can just leave commas on the last item in an object and it doesn't care (and keeps yelling at me for adding ;
s ... )
Thanks for pointing that out, removed comma and it installed properly.
The last thing I'm not clear on from the doc is what is the difference between adding a dependency in my bower.json file and executing bower install select2 --save
on command line?
And another quick question, what if the bower components are using require to load in their own dependencies?
I tried quickly using the meteorhacks:npm package and adding requirejs to the packages, but that doesn't seem to solve it, just keeps throwing Uncaught ReferenceError: require is not defined
Hi!
bower install
just adds latest to your bower.json
meteor add aramk:requirejs
.These are the dev dependencies for the bower module, I should install every one of these?
"devDependencies": {
"browserify": "^6.2.0",
"glob": "^4.0.6",
"gulp": "^3.8.9",
"gulp-if": "^1.2.4",
"gulp-jasmine2-phantomjs": "^0.1.1",
"gulp-livereload": "^3.4.0",
"gulp-notify": "^1.4.2",
"gulp-shell": "^0.2.10",
"gulp-streamify": "0.0.5",
"gulp-uglify": "^0.3.1",
"gulp-util": "^3.0.0",
"phantomjs": "^1.9.12",
"reactify": "^1.1.0",
"vinyl-source-stream": "^0.1.1",
"watchify": "^2.1.1"
},
It's meant to be browserified, which is something I have never been able to get working in meteor at all. It's super easy to gulp/browserify a project outside of meteor, webpack is super smooth too. But getting them running on top of meteor seems to be a huge mystery to everyone I've been able to ask.
Any ideas?
I don't know about browserify, but I think those (devDependencies) are the dependencies for developing the module, not using it.
On Saturday, April 4, 2015, tehfailsafe notifications@github.com wrote:
These are the dev dependencies for the bower module:
"devDependencies": { "browserify": "^6.2.0", "glob": "^4.0.6", "gulp": "^3.8.9", "gulp-if": "^1.2.4", "gulp-jasmine2-phantomjs": "^0.1.1", "gulp-livereload": "^3.4.0", "gulp-notify": "^1.4.2", "gulp-shell": "^0.2.10", "gulp-streamify": "0.0.5", "gulp-uglify": "^0.3.1", "gulp-util": "^3.0.0", "phantomjs": "^1.9.12", "reactify": "^1.1.0", "vinyl-source-stream": "^0.1.1", "watchify": "^2.1.1" },
It's meant to be browserified, which is something I have never been able to get working in meteor at all. It's super easy to gulp/browserify a project outside of meteor, webpack is super smooth too. But getting them running on top of meteor seems to be a huge mystery to everyone I've been able to ask.
Any ideas?
— Reply to this email directly or view it on GitHub https://github.com/mquandalle/meteor-bower/issues/74#issuecomment-89661895 .
Yeah, that's what keeps tripping me up. The build process for many of the js community tools are built around npm as a standalone with their own build process using grunt/gulp/webpack... If I could just figure out how to correctly set it up so it builds on their own prior to being included by meteor there would be sooo many things I could start adding into meteor projects that I currently can't use.
I'm currently limited to only using packages that other meteor devs have already re-bundled, but there's much more out there that hasn't been done yet. I'd be happy to make and release my own packages if that's the way to make it work.
I've only used the built versions of packages. If you needed to edit the pre-built source, I would manually run grunt once after, and then include the built file.
On Saturday, April 4, 2015, tehfailsafe notifications@github.com wrote:
Yeah, that's what keeps tripping me up. The build process for many of the js community tools are build around npm as a standalone witht their own build process using grunt/gulp/webpack... If I could just figure out how to correctly set it up so it builds on their own prior to being included by meteor there would be sooo many things I could start adding into meteor projects that I currently can't use.
— Reply to this email directly or view it on GitHub https://github.com/mquandalle/meteor-bower/issues/74#issuecomment-89663765 .
I don't need to edit the source at all, i just want to use it... Using bower install it gives me all the source and a release folder, but taking the release file and dropping it in the lib dir for meteor doesn't work either since that file too is using module.exports
.
Which package is this? select2?
On Sat, Apr 4, 2015 at 2:01 PM, tehfailsafe notifications@github.com wrote:
I don't need to edit the source at all, i just want to use it... Using bower install it gives me all the source and a release folder, but taking the release file and dropping it in the lib dir for meteor doesn't work either since that file too is using module.exports.
— Reply to this email directly or view it on GitHub https://github.com/mquandalle/meteor-bower/issues/74#issuecomment-89667416 .
No, select2 has a nice package in atmosphere that just worked super easily. This is for https://github.com/christianalfoni/formsy-react#install which has an npm install
and bower install
option.
With a bower.json
of:
you should see something like this in your html:
Do you? If not, what do you see?
Sorry, that was the wrong second screenshot. Updated.
I do see the formsy-react
script tag, however I get this console error:
Uncaught ReferenceError: global is not defined
which points to this part of the main.js
file
var React = global.React || require('react');
Which led me down the road of trying to figure out the require issues. I can remove that whole React require line since I know meteor has it already as a global variable, but then I get require is not defined
, it's trying to build the the main.js
file instead of using the one in the release folder.
If I remove it all, copy the released file over to the lib directory by itself, then run I get Formsy is not defined
since the build file also uses module.exports
to export itself.
Oh I see. Sorry, I haven't dealt with built client libs using require.
Following the readme, I don't see what might be causing this error. Added the package to meteor, created
lib/bower/bower.json
copied the "select2" example, run meteor and it fails to start.bower.json