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

ClearNuxtData import error #15149

Closed
agracia-foticos opened this issue Oct 13, 2022 · 4 comments
Closed

ClearNuxtData import error #15149

agracia-foticos opened this issue Oct 13, 2022 · 4 comments

Comments

@agracia-foticos
Copy link

Environment

  • Operating System: Linux
  • Node Version: v18.7.0
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: npm@8.15.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

We are using the clearNuxtData function and it throws us an import error.

With Script Setup lang="ts"
image

Without Script Setup lang="ts"
image

how to use clearNuxtData function?
There is any error?

Describe the bug

We are using the clearNuxtData function and it throws us an import error.

With Script Setup lang="ts"
image

Without Script Setup lang="ts"
image

how to use clearNuxtData function?
There is any error?

Additional context

No response

Logs

[nitro] [dev] [unhandledRejection] ReferenceError: clearNuxtData is not defined
    at setup (/home/foticos/var/www/wanapix_next/src/pages/cart.vue:59:2)
    at _sfc_main.setup (/home/foticos/var/www/wanapix_next/src/pages/cart.vue:279:23)
    at callWithErrorHandling (/home/foticos/var/www/wanapix_next/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:157:22)
    at setupStatefulComponent (/home/foticos/var/www/wanapix_next/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7109:29)
    at setupComponent (/home/foticos/var/www/wanapix_next/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7064:11)
    at renderComponentVNode (/home/foticos/var/www/wanapix_next/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:172:17)
    at renderVNode (/home/foticos/var/www/wanapix_next/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:299:22)
    at renderComponentSubTree (/home/foticos/var/www/wanapix_next/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:263:13)
    at renderComponentVNode (/home/foticos/var/www/wanapix_next/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:188:16)
    at renderVNode (/home/foticos/var/www/wanapix_next/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:299:22)
@danielroe
Copy link
Member

Would you provide a reproduction? 🙏

@agracia-foticos
Copy link
Author

I create a "template page"

clearnuxtdata.vue

Hola
<script setup> clearNuxtData() </script>

This page throws
image

If i use lang="ts"

image

@agracia-foticos
Copy link
Author

The page has this code

image

Copy link
Member

Ah, my apologies. This has already been resolved in the edge channel via nuxt/framework#7710 and will be released in RC12 shortly.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
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