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.
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})
I've a date picker component like this
<v-date-picker v-model="date" range landscape></v-date-picker>
and this is modeled to the date array. Which is work fine when I run the project localy.
Once I build the project in the production I got these errors
TypeError: t.split is not a function or its return value is not
iterable
TypeError: Cannot set property 'isDark' of undefined
TypeError: this.lastValue.split is not a function
TypeError: t.trim is not a function
and a warning says
Value must be a String, got Array
Any idea why this happen only in the production (npm build) and works fine in the dev (npm serve)
This problem stems from previous versions of vuetify, just upgrade to a recent version of Vuetify to fix the problem.
This may be a long shot but I'm seeing the weirdest thing. I'm using the setValue and addValue functions from WebdriverIO and whenever my string contains the number 3, it is being stripped out and not entered into the input boxes. I am manually able to type 3 into these inputs so I have no idea what is going on. 3 is the only character I've seen this happen with.
Any ideas?
Update: This is only occurring in Chrome
Update 2: Sorry for the lack of details. Here is additional info. I'm using wdio test runner. This issue does not occur in Safari or Firefox, only in chrome.
browser.setValue(usernameInput, "t3st") will input "tst" into the usernameInput element. As well
browser.addValue(usernameInput, "t3st"). Any string containing a 3 will be inputted to any element, but all 3's will be missing from the string.
package.json dependencies:
"dependencies": {
"babel-preset-es2015": "~6.24.0",
"babel-register": "~6.26.0",
"chai": "~4.1.2",
"chromedriver": "^2.33.2",
"wdio-cucumber-framework": "~1.0.2",
"wdio-phantomjs-service": "~0.2.2",
"wdio-selenium-standalone-service": "~0.0.9",
"wdio-spec-reporter": "~0.1.2",
"webdriverio": "4.7.1"
},
"devDependencies": {
"babel-jest": "~21.2.0",
"babel-polyfill": "~6.26.0",
"eslint": "~4.9.0",
"eslint-config-airbnb-base": "~12.1.0",
"eslint-plugin-import": "~2.8.0",
"forever": "~0.15.3",
"http-server": "~0.10.0",
"jest": "~21.2.0"
}
Well, I had a look, but didn't manage to reproduce it. I tried both of the bellow examples using different variants of chromedriver, or wdio-selenium-standalone-service. All worked just fine.
My guess is that:
maybe that input you're trying to fill in has some JavaScript logic behind (form-validation) which might be truncating digits;
or, maybe you have some old software (outdated packages) from your package.json dependencies which you previously installed globally (npm install -g <packageName>) and forgot about;
WebdriverIO (v4.8.0):
> browser.setValue('*[connectqa-mya="first-name"]',"t3st t3st t3st 1234test")
{ state: 'pending' }
> [13:27:12] COMMAND POST "/wd/hub/session/29096eb4bd851d6e3a49ad740c3c1ead/elements"
[13:27:12] DATA {"using":"css selector","value":"*[connectqa-mya=\"first-name\"]"}
[13:27:12] RESULT [{"ELEMENT":"0.8157706669622329-6"}]
[13:27:12] COMMAND POST "/wd/hub/session/29096eb4bd851d6e3a49ad740c3c1ead/element/0.8157706669622329-6/clear"
[13:27:12] DATA {}
[13:27:12] COMMAND POST "/wd/hub/session/29096eb4bd851d6e3a49ad740c3c1ead/element/0.8157706669622329-6/value"
[13:27:12] DATA {"value":["t","3","s","t"," ","t","3","s","t"," ","(13 more items)"],"text":"t3st t3st t3st 1234test"}
WebdriverIO (v4.7.1):
> browser.setValue('*[connectqa-mya="first-name"]',"t3st t3st test1234 ##$%^&*")
{ state: 'pending' }
> [13:38:25] COMMAND POST "/wd/hub/session/3b621c3d7a774872cf3a37d1bec17014/elements"
[13:38:25] DATA {"using":"css selector","value":"*[connectqa-mya=\"first-name\"]"}
[13:38:25] RESULT [{"ELEMENT":"0.42949459661053613-6"}]
[13:38:25] COMMAND POST "/wd/hub/session/3b621c3d7a774872cf3a37d1bec17014/element/0.42949459661053613-6/clear"
[13:38:25] DATA {}
[13:38:25] RESULT undefined
[13:38:25] COMMAND POST "/wd/hub/session/3b621c3d7a774872cf3a37d1bec17014/element/0.42949459661053613-6/value"
[13:38:25] DATA {"value":["t","3","s","t"," ","t","3","s","t"," ","(16 more items)"]}
As next-steps in the debugging process I would:
try to replicate the project with the same dependencies in a different folder/repo and see if it works;
for the above approach I would start with the latest versions of the packages you're using (e.g.: WebdriverIO wasn't up to date);
try to use .execute("$('<selector>').val('t3st t3st test12345');") and see if using JavaScript/JQuery would yield different results (if so, it would narrow down the problem: not form-validation, but probably chromedriver).
Let me know how it went, or if it helped. Cheers!
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.