Open Houndsto0th opened 6 years ago
Hey @Houndsto0th!
I've just tried installing the addon to a fresh Ember CLI 3.1.3 app. I see some deprecation warnings, but no build errors.
What's the ember-cli
version of your app? What's your ember-cli-build.js
config?
my ember-cli-build.js
is:
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function (defaults) {
var app = new EmberAddon(defaults, {
// Add options here
'ember-emojione': {
// Did you install individual files or the full package?
separatePackages: true,
// Do you want EmojiOne CSS to be included in your app?
shouldImportCss: false,
// Are you going to use components that insert emoji?
shouldImportDefs: false,
// Whether to use a sprite sheet or individual images
spriteSheet: true,
// Enable one of these options if you want to include
// EmojiOne assets into your app's distro.
shouldIncludePngSprite: false,
shouldIncludeSvgSprite: true,
shouldIncludePngImages: false,
shouldIncludeSvgImages: false,
pngImagesKind: 'png',
svgImagesKind: 'svg',
packageNameMain: 'emojione',
packageNameJs: 'emojione-js',
packageNameSvgSprite: 'emojione-svg',
shouldIncludeComponents: false,
},
});
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
app.import('bower_components/moment/moment.js');
return app.toTree();
};
and I'm on "ember-cli": "~2.18.2",
Please also post the relevant part of your bower.json
.
This might be caused by a different problem that I'm working through right now. I'll either comment back or close this based on the next hour or so of troubleshooting. I appreciate the quick responses
So, after pulling a fresh branch I'm still getting the error with:
Build failed.
Build Error (Funnel)
ENOENT: no such file or directory, lstat 'bower_components/emojione-defs'
This happened after following the install steps:
yarn add -D ember-emojione
then
bower install -S emojione
In this instance I didn't make any edits to my ember-cli-build.js file whatsoever. I need to have the files locally from the install although we're really only using some methods from the library and the svg spritesheet so I'm completely open to other install paths that would give me the same results
So, after following the other install step I'm able to get further it seems but I still run into an issue with the svg spritesheet
ENOENT: no such file or directory, lstat 'bower_components/emojione-svg/assets/sprites'
"dependencies": {
"emojione-js": "https://raw.githubusercontent.com/Ranks/emojione/v2.2.7/lib/js/emojione.js",
"emojione-css": "https://raw.githubusercontent.com/Ranks/emojione/v2.2.7/assets/css/emojione.css",
"emojione-svg": "https://raw.githubusercontent.com/Ranks/emojione/v2.2.7/assets/sprites/emojione.sprites.svg",
"emojione-defs": "https://raw.githubusercontent.com/Ranks/emojione/v2.2.7/emoji.json"
}
is what my bower.json looks like
One more thing to note, it looks like if I use the png sprite sheet that works just fine but using the svg sheet seems broken
I confirm this is a bug.
I have attempted a fix in the fix-51-svg-sprite-import-path
branch. Can you please try it via:
yarn add -D Deveo/ember-emojione#fix-51-svg-sprite-import-path
I'll release it after you confirm it resolves the issue.
I can confirm switching to this branch allowed me to run tests with my ember-cli-build.js having the svg import set to true and the png set to false.
I'm not sure this is related but it looks like the svg sprite sheet is being brought in as bower_components/emojione-svg/index.svg
instead of the emojione.sprites.svg
file and that's interfering with the _generateTreeForSvgSprite
method in your index.js
I'm not sure this is related but it looks like the svg sprite sheet is being brought in as bower_components/emojione-svg/index.svg
This is expected when you choose not install the whole emojione
package and instead go for
bower install -S emojione-svg=https://raw.githubusercontent.com/Ranks/emojione/v2.2.7/assets/sprites/emojione.sprites.svg
The problem you were seeing was caused by the addon using the whole-package path to the SVG file instead of the individual import path.
I'm gonna release the fix later. Meanwhile, please use the addon from the branch.
So how can I fix the file import for the svg sprite sheet?
Oh, I thought using the fix-51-svg-sprite-import-path
branch fixed the issue for you. 😦
Can you please tell me what error you see on that branch?
it looks like the svg sprite sheet file is called index.svg
but the addon looks for it to be named emojione.sprites.svg
Maybe it's that the installation instructions aren't comprehensive for using the svg sprite sheet?
That may be true, but please describe what's happening for you on the branch. Any specific error message?
I just get a 404 on the localhost:4200/assets/sprites/emojione.sprites.svg
Ah, dammit! I've recently switched from Linux back to Windows. Windows substitutes emoji symbols with graphical emoji. I didn't realize that, I saw the emoji and thought that my fix was working.
Will look again, sorry about that.
Any update on this? I've just added an app.import
statement pointing to the index.svg
file for now
I'm getting a
Build Error (Funnel)
issue after installing the addon + option 2 of the installation options (we have to serve the sprite sheets locally for offline use). The error reads:ENOENT: no such file or directory, lstat 'undefined/emojione-defs'
If there's any other information I can supply to help resolve this I'm happy to give it. Thanks