Problems getting semantic:ui-css on Meteor 1.4.x
$ meteor add semantic:ui-css => Errors while adding packages:
While checking for semantic:[email protected]: error: No compatible binary build found for this package. Contact the package author and ask them to publish it for your platform.
I'm having this problem too. Which is funny -- I thought that meteor 1.4 was doing away with binaries published by package authors. At any rate, I have a compatible toolchain installed, as I was able to meteor npm install bcrypt without trouble.
A workaround was posted on #20, which is to set a previous version for now:
meteor add semantic:ui-css@=2.1.2
Ironically I'm also getting this same message with some other packages I depend on in 1.4.x, and not sure how to solve for myself.
@jlukic Which packages exactly are you having problems with? Maybe someone could help with that?
For what it's worth, here's the package.js file that I am using to define a local smart package and I can fetch whatever version of semmantic-ui-css from npm, and it works perfectly well.
/*globals Package, Npm*/
Package.describe({
name : 'essentials:semantic-ui',
version : '2.2.4',
description : 'A wrapper for semantic-ui',
});
Npm.depends({
'semantic-ui-css': '2.2.4',
});
Package.onUse(function (api) {
api.versionsFrom('1.4');
api.use('jquery', 'client');
api.addFiles([
'.npm/package/node_modules/semantic-ui-css/semantic.js',
'.npm/package/node_modules/semantic-ui-css/semantic.css',
], 'client');
api.addAssets([
'.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.eot',
'.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.otf',
'.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.svg',
'.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.ttf',
'.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.woff',
'.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.woff2',
], 'client');
});
I looked into package.js and what I think is wrong with it are the following two points:
- We should be using
addAssetsinstead ofaddFilesfor fonts and images. - Using
versions('1.0')can force and outdated versions of some packages, which is probably the main source of the problem described in this ticket. Look here.
Could you please fix this?
Yeah, the package won't install for me either. Having to use v2.1.2 in order for it to work. :/
how do i fix this, I need some 2.2 features
@s-devaney The best workaround I can think of is creating a local semantic-ui package using the code I pasted in my comment above:
https://github.com/Semantic-Org/Semantic-UI-CSS/issues/23#issuecomment-257533357
This will allow you to choose whatever version you want.
@apendua why you still need meteor package for that? Pure npm package is not enough?
@chompomonim That's a very good question. The only reason I think you will need a package in this particular case is importing font assets. If it was only about css and js files, you should be able to import them directly into your project with no problems. However, with the current meteor build system, I don't see a clear way (without modifying paths in css) to have those assets included properly without a wrapper package.
I've tried importing the npm package and I can't get it to work - lots of issues with relative paths to fonts etc not playing nice with the meteor build tool...
@apendua do you have any instructions on how to add your local smart package to my project?
EDIT: got it working. For others:
- Uninstall any Semantic Atmosphere or NPM packages
- Create a
packagesdirectory at the root of your project - Create a
semanticdirectory within that - Paste the code above into a
package.jsfile. Save it within the newsemanticdirectory - Run
meteor add essentials:semantic-uito install the local package - Run
meteor buildand it should work...
@s-devaney It's great you figured that out. Sorry I couldn't respond earlier, it's a timezone difference problem.
check the last comment on #38