How to locate coding error in vuejs SPA with Visual Studio Code? - vue.js

I try to build a vue SPA and encounter this error
vite v2.9.15 building for production...
✓ 124 modules transformed.
[rollup-plugin-dynamic-import-variables] Assigning to rvalue (3271:44)
file: /ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/src/components/RecipeEditor.vue:3271:44
error during build:
SyntaxError: Assigning to rvalue (3271:44)
at Parser.pp$4.raise (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:19738:13)
at Parser.pp$7.toAssignable (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18231:12)
at Parser.pp$5.parseMaybeAssign (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18754:21)
at Parser.pp$5.parseParenAndDistinguishExpression (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:19209:28)
at Parser.pp$5.parseExprAtom (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:19072:41)
at Parser.pp$5.parseExprSubscripts (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18905:19)
at Parser.pp$5.parseMaybeUnary (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18871:17)
at Parser.pp$5.parseExprOps (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18798:19)
at Parser.pp$5.parseMaybeConditional (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18781:19)
at Parser.pp$5.parseMaybeAssign (/ORIGINAL-P1/LARAVEL-BREW/BrewersCompanion/vue/node_modules/rollup/dist/shared/rollup.js:18748:19)
The builder points to line 3271 but I am pretty sure that there is not right hand variable assignation i.e. no error here.
To confirm my thinking, as it is in a rather long function that returns a value I decide to comment this function and to replace it by a very short one returning a number, like this.
function currentTemperature(time, time_step) {
return 373;
}
The program continues to compile pretty well with npm run dev
But npm run build returns the same error still pointing on the same line that is now in a comment.
My question is how to locate my error as the builder returns an invalid location ?
I am using Visual Studio Code
Thank you in advance for help.

Related

TypeError: userAgent.toLowerCase is not a function

While running Angular-unit test, using chrome browser, ended up with the error as
TypeError: userAgent.toLowerCase is not a function
at _isAndroid (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/forms/fesm2015/forms.mjs:176:43)
at new DefaultValueAccessor (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/forms/fesm2015/forms.mjs:227:38)
at NodeInjectorFactory.factory (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/forms/fesm2015/forms.mjs:254:1)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:3565:44)
at instantiateAllDirectives (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:10318:27)
at createDirectivesInstances (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:9647:5)
at ɵɵelementStart (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:14561:9)
at templateFn (ng:///TodaysMarketMoversComponent.js:397:66)
at executeTemplate (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:9618:9)
at renderView (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:9421:13)
Most wondering/confusing part to me- toLowerCase function has never been used through out the component/spec file.
It looks like the userAgent is being checked by the #angular/forms lib and has been deleted or not provided at all for some reason.
If it's not your code that's changing the userAgent then it's probably some third-party script.
If I were you I'd start with the latest additions in terms of libraries and dependencies and peel them back until I get a unit test running. That will give the clue.

Kotlin BuildType 'XYZ': id 'XYZ' is already used in BuildType(uuid='', id='XYZ', name='Deploy to envr') error

I was trying to refactor my Kotlin file that contains the configuration for a TeamCity pipeline. However, I keep getting the following error:
BuildType 'KotlinExperiments_DeployToEnvironment': id 'KotlinExperiments_DeployToEnvironment' is already used in BuildType(uuid='', id='KotlinExperiments_DeployToEnvironment', name='Deploy to test')
I tried to dynamically assign an ID, but that doesn't seem to work. Here are the links to the relevant files:
.teamcity/settings.kts
.teamcity/KotlinExperiments.kt
.teamcity/_buildTypes/DeployToEnvironment.kt
What am I missing?
It appears that there was an extra } in this line which is an invalid character for an ID. TeamCity didn't really provide an accurate error. After deleting the whole and recreating it again, TeamCity provided a much better error which led me to this finding.

gen_contour_region_xld control parameter error in c#

After I developed my code in HDevelop,
find_local_deformable_model (ImageReduced1, ImageRectified, VectorField, DeformedContours, ModelID...)
gen_region_contour_xld (DeformedContours, EdgeRegion, 'margin')
union1(EdgeRegion, RegionUnion)
region_features(RegionUnion,['width','height'],WidthAndHeight)
It can run, but after I export it to C#, it cannot, reported:
HALCON error #1301: Wrong value of control parameter 1 in operator
When I export it to cpp, it can run also.
What is the problem?
finaly I find this is a typo, when coding against VS, I made the code install of export, so this introduced a typo, by HOperateSet., it gave me GenContourGeionXld, should be GenRegionContourXld.

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.

Append database record in HTML5 builder fatal error

I have some code in my application:
$dmMain->tblOrgList->append();
This code written with auto-completion, so everything is correct.
But, when I trying to execute this code, I have error:
Fatal error: Call to a member function append() on a non-object in
C:\Users\ASAP\Documents\HTML5 Builder\Projects\VitoOrgList\index.php
on line 18
Can somebody advice, where I can find a trouble?
Thanks
I found the solution.
Really, I have no big PHP experience :-]
I just added before calling $dmMain methods in function body:
global $dmMain;