Unable to use this liberary in Angular2 Kindly create any demo project
See original GitHub issueAppComponent_Host.html:1 ERROR TypeError: Right-hand side of 'instanceof' is not an object
at n._setElement (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:15188)
at n.setElement (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:15110)
at n._ensureElement (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:16010)
at n.e.View (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:14646)
at new n (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:22607)
at Object.init (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:327758)
at n.loadModule (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:354056)
at n.eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:353244)
at Array.forEach (<anonymous>)
at n.initialize (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2:353219)
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
One library can't import another library · Issue #10665 - GitHub
It happens when you migrate an application from 5.x to latest angular version, in my case it was 7.x. So old tsconfig.app contained...
Read more >Library build fails with Angular 9 - Stack Overflow
Before publishing a library to NPM, build it using the --prod flag which will use the older compiler and runtime known as View...
Read more >Creating libraries - Angular
This page provides a conceptual overview of how to create and publish new libraries to extend Angular functionality. If you find that you...
Read more >A complete guide to Angular libraries - Will Taylor Blog
We will create an Angular library, as well as a demo application to consume this library. We can create these with the following...
Read more >The Best Way To Architect Your Angular Libraries
Generate new Angular CLI workspace (without default application) ng new angular-library-architecture-example --createApplication false --prefix ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think you’re doing something wrong, @aliassad
This is how I got to use grapesjs with
Angular 2/4Angular:npm install grapesjs --save
. jQuery will be installed for youon .angular-cli.json, add the source of both style and script of grapesjs and jQuery script:
–
I’d close this issue if these steps above work (which is the Angular way of dealing with 3rd party libraries). It is somewhat confusing to configure grapesjs on an Angular project, but it works.
I faced @aliassad’s problem when I was importing jQuery@2.2.4 on the
index.html
. It could be that jQuery’s version is your problemObs: it works if you import jQuery@3.2.1 on the
index.html
. But please, don’t.thanks @andre-bonfatti-movile for your examples, might be useful for someone else @aliassad try to update the grapesjs to the latest version, I’ve made some errors a little bit more verbose (eg. missing jQuery). For now, I close this one