Is there a way to install GraphicsMagick on Heroku? - node.js

I want to use gm package to generate thumbnail image (50x50) but I must install graphicsmagick in my Heroku server. So I googled it ,but haven't got a solution.

2021 Update:
I managed to install GraphicsMagick on my NodeJS Heroku project.
You just have to add heroku-buildpack-graphicsmagick
into your project.
Right now there are a lot of methods, but the fastest one is:
Go to your Heroku Dashboard > Your Project > Settings tab
Scroll down to your Buildpacks section.
Add the buildpack .git link:
https://github.com/xerpa/heroku-buildpack-graphicsmagick.git
Save and deploy your app again. Then it will be instaled.
Here's how it should look:
Now it should work.
If you're interested in my case:
I was trying to add a library to create barcodes into a pdf. For that I used a library called barcode and pdfkit. Then in order for the barcode library to work, I had to have a working installation of GraphicsMagick. Then I discovered that I had to install this 'gm' dependency into my Heroku project.
Also, this is how it looks when deploying your project:
GraphicsMagick app detected
+ install GraphicsMagick-1.3.19

I din't install anything on Heroku but It works I think GraphicsMagic is default

Related

CKEditor5 Online Editor - How to configure a custom npm package for strapi

i use strapi and i want to change the default text editor with the ckeditor5 classic.
On the strapi website is a guide how to configure the default ckeditor5 classic for strapi.
Strapi Guide
But there are some important tools missing so I want to build my custom fork of the ckeditor5 classic package.
I started with the ckeditor5 online builder. Downloaded the build package and want to import it in the strapi project.
Online Builder
My problems starting here.
First of all, how I can use a downloaded package in a project instead of download it over npm/yarn?
Package Structure:
build
sample
src
Licsence
package.json
webpack.config
I saw that package has no main command in the package.json. So an import in a node.js file to this package doesn't work. Here is my question, is this package i build with the online generator intended for usage in a node project?
Look at the truth, I don't know very well, I'm not an expert on the subject yet ... I'm really new and I'm working with strapi, but as I see these plugins have an install command with NPM. Example:
enter image description here
Try to download the plugins by NPM or Yarn and then import them as they say in this post: Customizing CKEditor for Strapi gives "ckeditor-duplicated-modules" error

Whats the role of Node.js in a Polymer setup?

Why do I have to install Node.js to work with Polymer? Just because of npm? Are there any other uses for Node.js in a typical Polymer project? Or is npm just used to install Bower, and Bower to install project dependencies?
Node.js is just use to create project files. create a polymer project you have to use the console polymer CLI.
once files are generated you don't need the CLI until new project or to modify the current one.
You don't need Node.js. You can download all the components you want (plus all their dependencies and polyfills) from Github yourself, and organize them in your project directory. You also don't need any project files if you're going that route.
If you want, however, to conveniently install the components and all their dependencies, you can use bower, or the more recent yarn, which use Node.js. Also, if you want to host your project on Github or similar, it's useful to just commit bower.json which contains a list of all the dependencies (and can then conveniently be installed after cloning the repo), instead of forking all of Polymer's code into your project repo.
Having this said, if all you need is Polymer itself without any of the web components Polymer provides, it's probably even easier to just download Polymer and the required polyfills yourself.
There are more uses for Node.js. You may want to use some packages in your Polymer project, such as Redux, which you can also just download yourself, or install using NPM/Node.

Can I directly use imagemagick in Heroku on node.js

I'm going to deploy my web app soon on Heroku (standard). So can I simply start using Imagemagick right off the bat or not? I already have it installed locally on my computer and obviously have the module required as well in my app.
So will it work exactly as it's working on my machine? like resizing images and getting the src path of images from specific folders like I have on my computer (I'm a newbie at deployment sorry).
You have to add the imagemagick buildpack on heroku:
heroku buildpacks:add --index 1 https://github.com/ello/heroku-buildpack-imagemagick.git
And then you can use a library to call imagemagick

Meteor.js - add packaging for 3rd party library

i followed the official meteor instructions for adding package support to 3rd party libraries (source: https://github.com/MeteorCommunity/discussions/issues/14).
When i test the meteor integration with meteor add i keep getting an error:
add: You're not in a Meteor project directory.
I can't figure out whats missing??
EDIT: To be more clear: I ve forked phaser.io to my local devmachine and added a meteor directory to the root of the phaser library. The meteor directory contains export.js, package.js and test.js.
You need to initialise a meteor project directory with:
meteor create myappname
cd myappname
meteor add mymeteoruser:mypackagename
This is assuming you've published your package as per the linked instructions in your question.
You can only add a package if you have already created a meteor app for it to go into (on a really basic level this creates a .meteor folder containing all the necessary bits and pieces to keep track of which packages you have installed)

Work on node.js module in place

I'm working on my node.js demo.location.io web app at the same time as my location.io library. I'd like to be able to make changes to the location.io library and push them up to github from inside the node_modules folder. Is there any support for this in npm?
(If I understand your question) You can use
npm link
to link your location.io to your local demo.location.io repo. More info here

Resources