1.7.11
I am using electron-forge with node 7.9.0 i have installed fabricjs by using npm install --save everything was fine but when i try to use it i get the following error

maybe as i mentioned abouve
start playing with the canvas!!
i can't play with the canvas 馃槥
so please share some detail about electron forge and how you setup the app.
otherwise i cannot really help.woth anything.
i have fixed this by using the web version in staid of the node version.
I have the same problem using fabric in electron when installed via npm. I imported it like this:
import fabric from 'fabric';
I got an error:
Uncaught TypeError: _fabric2.default.Canvas is not a constructor
Finally, I made it work by importing it like that:
import 'fabric';
// later use it in the standard way
const canvas = new fabric.Canvas('c');
@Olgagr the right way to import it is
import { fabric } from 'fabric';
as a side effect fabric will be anyway appended to window, that you may or may not want to happen.
There is a specific build parameter to disable appending the object to the window.
@asturur Yeah, you're right. I'm not sure why I was convinced that there is a default export :)
Most helpful comment
@Olgagr the right way to import it is
import { fabric } from 'fabric';as a side effect fabric will be anyway appended to window, that you may or may not want to happen.
There is a specific build parameter to disable appending the object to the window.