The 'graphlib' utility is a mandatory dependency - vuejs2

I am using joint js 3.1.1 version and graphlib 2.1.8 version.
I have a code in my app to check cyclic reference in graph. For that purpose I have written below code
graphlib.alg.findCycles(graph.toGraphLib())
This line gives following error
Uncaught Error: The the "graphlib" utility is a mandatory dependency.
at Object.toGraphLib (joint.min.js?de6d:8)
at child.He.toGraphLib (joint.min.js?de6d:8)
at RestrictCyclicConnection (links.js?2d1e:46)
at child.eval (businessobjectdesigner.vue?b25b:856)
at triggerEvents (backbone.js?ab5c:338)
at triggerApi (backbone.js?ab5c:322)
at eventsApi (backbone.js?ab5c:110)
at child.Events.trigger (backbone.js?ab5c:312)
at child.notify (joint.min.js?de6d:8)
at child._notifyConnectEvent (joint.min.js?de6d:8)
I have imported graphlib in my file also. But still getting following error.
I have imported graphlib as
import graphlib from 'graphlib'

You can try by passing graphlib as a part of the options object, as follows-
graph.toGraphLib({graphlib: graphlib})

Related

cannot find symbol error: cannot find symbol import com.google.ads.mediation.facebook.FacebookAdapter;

I am getting this error "cannot find symbol import com.google.ads.mediation.facebook.FacebookAdapter" while trying to execute app in android studioenter code here
The problem is cause by 'com.google.ads.mediation:facebook:6.12.0.0'.
Google removed 2 classes: FacebookAdapter and FacebookExtras on version 6.12.0.0.
I don't know why they are remove them (maybe replace for a new API or maybe just a mistake). You can temporary resolve this by downgrade the package version to 6.11.0.0.

ng-mocks giving error about imports with jest-preset-angular

Using ng-mocks 13.5.2 with jest-preset-angular 12 and #ngneat/spectator 11 I am getting the below error any time I try to use MockComponents or MockPipe in my spec file.
I'm not sure why this is happening.
Must use import to load ES Module: /Users/scott/ltr/ltr/node_modules/#angular/core/fesm2020/core.mjs.
at Runtime.requireModule (node_modules/jest-runtime/build/index.js:1011:21)
at node_modules/ng-mocks/webpack:/ng-mocks/webpack/universalModuleDefinition:3:36
at Object.WEBPACK_EXTERNAL_MODULE__8900 (node_modules/ng-mocks/webpack:/ng-mocks/webpack/universalModuleDefinition:10:19)
The issue was reported and fixed, please use the latest version of ng-mocks: 14.0.1 or younger.
The problem was triggered by the node's flag: --experimental-vm-modules, which forces to use imports instead of require, whereas ng-mocks hadn't provided an esm build.
The fix was implemented here:
https://github.com/ike18t/ng-mocks/pull/2848
https://github.com/ike18t/ng-mocks/issues/2846

adding css causes failed build with Vue and Filepond

So, I am trying to follow a number of the file pond example and each of them include some form of CSS import (I get it, there is a lot that comes with beauty). However, no matter what I try, Filepond or Pintura (formerly Doka), I get this error in some form:
Compiled with problems:
ERROR in ./node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
ValidationError: Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
- options should be an object:
object { injectType?, attributes?, insert?, base?, esModule?, modules? }
at validate (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/node_modules/schema-utils/dist/validate.js:105:11)
at Object.loader (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/dist/index.js:25:29)
ERROR in ./node_modules/filepond/dist/filepond.min.css
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
ValidationError: Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
- options should be an object:
object { injectType?, attributes?, insert?, base?, esModule?, modules? }
at validate (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/node_modules/schema-utils/dist/validate.js:105:11)
at Object.loader (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/dist/index.js:25:29)
I have NO IDEA how to fix this as I am not experienced enough with what would be going on. I am guessing it has to do with Webpack and build but no idea what I need to do to fix it. Any help?
I also want to mention this is a Laravel/VueJS/Tailwind stack
The solution is to add the CSS files to the app.css file under /resources/css/app.css
#import 'filepond/dist/filepond.min.css';
#import "filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css";

FullCalendar Angular 13 error when importing npm library

I have an npm library which imports Angular FullCalendar v5 and everything works fine there. When i try to import my project library to another project and try access the full calendar frontend I got a warning and a message error in my browser console:
- Warning: main.js:7358 Unknown option 'default'
- Error: core.mjs:6476 ERROR TypeError: Language ID should be string or object.
at new DateTimeFormat (<anonymous>)
at buildNativeFormattingFunc (main.js:1218)
at NativeFormatter.buildFormattingFunc (main.js:1211)
at NativeFormatter.buildFormattingFunc (main.js:1009)
at NativeFormatter.format (main.js:1154)
at NativeFormatter.formatRange (main.js:1169)
at DateEnv.formatRange (main.js:3984)
at CalendarDataManager.buildTitle (main.js:6909)
at CalendarDataManager.buildTitle (main.js:1009)
at CalendarDataManager.updateData (main.js:7113)
I can't figure it out why but i know it's in this line of code at main.js (#fullcalendar/common/main.js)
Line 1218 -> var normalFormat = new Intl.DateTimeFormat(context.locale.codes, standardDateProps); The error is that the variable context.locale.codes is undefined.
Can anyone help?
I've just had the same error. Not that I was importing a project library of my own but I was importing the Fullcalendar library (from node_modules). I had enabled localization using the locale property of the calendar options but I always got this error Language ID should be string or object.
Two things was wrong:
I was importing the locale code incorrectly which resulted in this error. The current version of Fullcalendar (6.0.0) has all its locale code under #fullcalendar/core/locales.
I was using dynamic import like this: import("#fullcalendar/core/locales/da") and it worked fine but I had to access the default property of the exported object. Using async/await syntax it becomes:
const localeModule = await import("#fullcalendar/core/locales/da");
const calendar = new Calendar(someElement, {
(...),
locale: localeModule.default
});
Not directly answering your question but it sounds like you're using locale, too, and your other project is importing your project library in a way that makes the default property of the module containing the locale code undefined.

Elm Graphics.Input

I'm trying to run the Elm input examples from this page. Specifically, the Text Field example, and I'm getting an error saying that the Graphics.Input module is missing.
I've got this in a file called Main.elm:
import Graphics.Input as Input
main = let (field, state) = Input.field "Type here!"
in lift2 display field state
display field state =
field `above` asText state
If I run elm-server and navigate to localhost:8000, I get the error
Your browser may not be supported. Are you using a modern browser?
Runtime Error in Main module:
Error: Module 'Graphics.Input' is missing. Compile with --make flag or load missing module in a separate JavaScript file.
The problem may stem from an improper usage of:
Input.field, above
Compiling the project with elm --make Main.elm gives me
elm: Graphics/Input.elm: openFile: does not exist (No such file or directory)
Is there something extra I need to do to install the Graphic.Input?
Additional Notes:
I'm running this on a Debian machine, and installed it using cabal install elm fairly recently (Jun 15 2013). The current version is labeled Elm-0.7.1.1.
If I hop into the chromium JS prompt and poke around, it turns out there's no Elm.Graphics.Input module, but there is an Elm.Input. There isn't a function called field, there's a similar looking one called textField, but it isn't trivially interchangeable.
Running this:
import Input
main = let (field, state) = textField "Type here!"
in lift2 display field state
display field state =
field `above` asText state
gives me the error
Your browser may not be supported. Are you using a modern browser?
Runtime Error in Main module:
TypeError: a is undefined
The problem may stem from an improper usage of:
above
The Graphics.Input package is new in version 0.8. So, since you're running version 0.7, that explains your problem.
0.8 was released somewhat recently, but it's definitely been out longer than June 15th, so you probably just forgot to cabal update before installing it. Running cabal update now and then updating elm to 0.8 should fix your issue.