Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after updating Vue 3 and Vmoney with TS #56

Closed
DiegoMDS opened this issue Feb 24, 2022 · 10 comments
Closed

Error after updating Vue 3 and Vmoney with TS #56

DiegoMDS opened this issue Feb 24, 2022 · 10 comments

Comments

@DiegoMDS
Copy link

Hi, first congratulations for the excellent work you do. Thank you very much!

After updating Vue to Vue version 3.2.31 and V-money 3 to version 3.21.0

It started displaying the following message:

in ./node_modules/v-money3/dist/v-money3.es.js

Module parse failed: Unexpected token (526:30)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| let lastValue = null;
| function change(evt) {

let value2 = evt.target?.value;
| debug(props, "component change() -> evt.target.value", value2);
| if (!(masked.value && !modelModifiers.value.number)) {

@ ./src/main.ts 3:0-43 15:28-43
@multi (webpack)-dev-server/client?http://192.168.1.6:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

Could you help me, please?

@jonathanpmartins
Copy link
Owner

jonathanpmartins commented Mar 3, 2022

Can you help me out with more information about your problem? Perhaps a working example on codesandbox.io, or a a shared repository.

Does it work with Vue 3.2.30 ?

@lmsfelipe
Copy link

Facing the same issue with Vue 3.2.26 and v-money 3.20.1

@uhelliton-megawhat
Copy link

Facing the same issue with Vue 3 + TS

@jonathanpmartins
Copy link
Owner

jonathanpmartins commented Sep 27, 2022

Could someone test if this issue persists with version 3.22.2 ?

@ianoble
Copy link

ianoble commented Oct 27, 2022

Yes, still an issue.

"v-money3": "^3.22.2",

@jonathanpmartins
Copy link
Owner

jonathanpmartins commented Oct 28, 2022

I cannot replicate this problem. If someone has an example, like @christhofer did in this comment, would be very helpful!

@ivancorrea
Copy link

ivancorrea commented Jan 27, 2023

Opa @jonathanpmartins ,

O erro está na linha 359 do arquivo v-money3.mjs do build:
let d = g.target?.value;

Testei trocando para:
let d = g.target && g.target.value;

E o erro desapareceu.

@ivancorrea
Copy link

Baixando o código aqui, encontrei na linha 179 do arquivo component.vue

let value: string | number = (evt.target as HTMLInputElement)?.value;

O uso do operador '?' causa o erro

jonathanpmartins added a commit that referenced this issue Feb 9, 2023
@jonathanpmartins
Copy link
Owner

Hey @ivancorrea, thank you to point out the problem. Can you confirm that the fix is valid for version 3.23.0?

@ivancorrea
Copy link

Hey @ivancorrea, thank you to point out the problem. Can you confirm that the fix is valid for version 3.23.0?

Yes! Fixed! :)

Tks @jonathanpmartins !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants