I need help setting up Meteor + React + Essence. From the instructions on Essence.io I added the framework to my project as follows:
meteor npm install --save react-essence
However, I got a number of warnings indicating all of the components require a peer of react@^0.14.8 but none was installed.
Here is my package.js
file:
{
"name": "MyApp",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"meteor-node-stubs": "~0.2.0",
"normalize.css": "^4.2.0",
"react": "^15.2.1",
"react-addons-css-transition-group": "^15.2.1",
"react-addons-pure-render-mixin": "^15.2.1",
"react-dom": "^15.2.1",
"react-essence": "^1.0.10",
"react-mounter": "^1.2.0",
"react-router": "^2.6.0"
}
}
And my .meteor/packages
file contains:
# meteor libraries
meteor-base
ecmascript
es5-shim
check
tracker
session
# standard libraries
jquery
underscore
less
email
# accounts
accounts-base
accounts-password
# ui
static-html
react-meteor-data
# data
mongo
mdg:validated-method
mdg:validation-error
# mobile
mobile-experience
# additionals
jparker:gravatar
mrt:jquery-ui-sortable
momentjs:moment
nathantreid:css-modules
standard-minifier-css
standard-minifier-js
Despite those warnings I was able to add an AppBar
and it showed up on my page, but then again there are a few errors showing in my browser console and I’m unable to add the Icon
component spitting out the following error.
Started MongoDB.
Errors prevented startup:
While building for web.browser:
node_modules/essence-icon/lib/icon.less:1: Unknown import: ~essence-core/src/less/variables.less
Your application has errors. Waiting for file change.`
The offending code is the following:
@import (reference) '~essence-core/src/less/variables.less';
Removing the (reference)
and giving the import a relative path '../../essence-core/src/less/variables.less';
does get rid of the error but the icons are not showing.
How do I fix this? Has anyone here got the Essence framework working for them in Meteor 1.3+ (I’m on 1.3.4.4)?