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

Nuxt migration #27833

Closed
Deepakra07 opened this issue Jun 26, 2024 · 3 comments
Closed

Nuxt migration #27833

Deepakra07 opened this issue Jun 26, 2024 · 3 comments

Comments

@Deepakra07
Copy link

Environment

getting this error after upgrading nuxt 2 to nuxt 3

500
[vite-node] [plugin:vite:vue] [SyntaxError] C:/kcweb new/KidsChaupalWeb/pages/assessment/_id.vue:16:29

15 | :currenttQuestionData="currenttQuestionData"
16 | @Getquestion="
17 | query.current_question_id = ''
| ^
18 | query.question_id = $event
19 | getAssessQuestionmentDeatils()

at C:/kcweb new/KidsChaupalWeb/pages/assessment/_id.vue:16:29
at createCompilerError (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:1328:17)
at emitError (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:2812:5)
at createExp (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:2805:7)
at Object.onattribend (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:2329:29)
at Tokenizer.handleInAttrValue (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:909:16)
at Tokenizer.stateInAttrValueDoubleQuotes (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:919:10)
at Tokenizer.parse (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:1063:16)
at Object.baseParse (C:\kcweb new\KidsChaupalWeb\node_modules@vue\compiler-core\dist\compiler-core.cjs.js:2851:13)

image

Reproduction

After upgrading nuxt 2 to nuxt 3

Describe the bug

I upgaded nuxt 2.12.1 to "Nuxt": "^3.12.2"
getting this issue compile time after running project

Additional context

No response

Logs

No response

@manniL
Copy link
Member

manniL commented Jun 26, 2024

if you'd write a handler for getQuestion instead of inlining the code, that should work!

@manniL manniL closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
Copy link
Contributor

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a couple of templates for starting with a minimal reproduction:

👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

@Deepakra07
Copy link
Author

Deepakra07 commented Jun 26, 2024

if you'd write a handler for getQuestion instead of inlining the code, that should work!
is this only nuxt 3 issue because it is using vite under the hood and it is perfectly working in nuxt2

is there any option to disable the vite js

this is my package.josn file

{

"version": "1.0.0",

"private": true,
"type": "module",

"scripts": {
"dev": "nuxt dev",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint"
},
"dependencies": {
"@bachdgvn/vue-otp-input": "^1.0.7",
"@nuxtjs/auth": "^4.9.1",
"@nuxtjs/axios": "^5.10.3",
"@nuxtjs/dotenv": "^1.4.1",
"@nuxtjs/google-analytics": "^2.2.3",
"@nuxtjs/google-gtag": "^1.0.4",
"@nuxtjs/sitemap": "^2.2.1",
"aws-sdk": "^2.672.0",
"axios": "^1.7.2",
"body-parser": "^1.19.0",
"bootstrap": "^4.1.3",
"bootstrap-vue": "^2.13.1",
"consola": "^3.2.3",
"core-js": "3.37.1",
"cross-env": "^5.2.1",
"dotenv": "^16.4.5",
"express": "^4.17.1",
"express-session": "^1.17.1",
"firebase": "^7.17.1",
"firebase-admin": "^12.1.1",
"js-cookie": "^2.2.1",
"lodash": "^4.17.15",
"mobile-device-detect": "^0.3.3",
"moment": "^2.29.1",
"nuxt": "^3.12.2",
"nuxt-facebook-pixel-module": "^1.3.0",
"sitemap": "^8.0.0",
"skeleton-loader-vue": "^1.0.10",
"tb-skeleton": "^0.3.6",
"timeago.js": "^4.0.2",
"uuid": "^8.0.0",
"vee-validate": "^2.2.6",
"vue-carousel": "^0.18.0",
"vue-clipboard2": "^0.3.1",
"vue-content-loader": "^0.2.3",
"vue-google-autocomplete": "^1.1.0",
"vue-infinite-scroll": "^2.0.2",
"vue-loader": "^15.9.3",
"vue-loading-overlay": "^3.3.2",
"vue-multiselect": "^2.1.6",
"vue-pdf": "^4.2.0",
"vue-star-rating": "^1.7.0",
"vue-stepper-component": "^1.0.0",
"@vue/compiler-core": "^3.4.24",
"vue-sweetalert2": "^1.6.4",
"vue-toastification": "^1.7.11",
"vue2-datepicker": "^3.11.0",
"vuejs-datepicker": "^1.6.2",
"vue": "^3.4.29"
},
"devDependencies": {
"@nuxt/image": "^1.6.0",
"eslint": "^9.4.0",
"sass":"1.77.4",
"sass-loader": "14.2.0"
}
}

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

No branches or pull requests

2 participants