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

hang when building app with ¿ #14140

Closed
frbuceta opened this issue Jun 13, 2022 · 8 comments
Closed

hang when building app with ¿ #14140

frbuceta opened this issue Jun 13, 2022 · 8 comments

Comments

@frbuceta
Copy link
Contributor

Environment

  • Operating System: Linux
  • Node Version: v18.1.0
  • Nuxt Version: 3.0.0-rc.3-27584539.9d28c0a
  • Package Manager: npm@8.11.0
  • Builder: vite
  • User Config: css, buildModules, vite, build
  • Runtime Modules: -
  • Build Modules: @pinia/nuxt@0.1.9

Reproduction

I don't know what is failing.

npm run build

➜  nuxt-project git:(main) ✗ npm run build

> build
> nuxi build

Nuxt CLI v3.0.0-rc.3-27584539.9d28c0a                                                                      10:16:45
ℹ Vite client warmed up in 7876ms                                                                          10:16:55
ℹ Client built in 9936ms                                                                                   10:16:57
ℹ Building server...
(It freezes)

npm run dev

Nuxt CLI v3.0.0-rc.3-27584539.9d28c0a                                                                      10:21:32
                                                                                                           10:21:32
  > Local:    http://localhost:3000/ 

ℹ Vite server warmed up in 295ms                                                                           10:21:40
ℹ Vite client warmed up in 5325ms
(It freezes)

Describe the bug

Nuxt never loads since I updated to the version mentioned above. The log is frozen and does not load.

Additional context

No response

Logs

No response

@pi0
Copy link
Member

pi0 commented Jun 13, 2022

Do you mind to make a reproduction sandbox? 🙏🏼

@frbuceta
Copy link
Contributor Author

frbuceta commented Jun 13, 2022

Do you mind to make a reproduction sandbox? 🙏🏼

I didn't reproduce it because I didn't know what was wrong. But I have detected the piece of code that makes nuxt fail.

<div class="text-sm">
  <a href="#" class="font-medium text-blue-600 hover:text-blue-500"> ¿Olvidaste tu contraseña? </a>
</div>

looks like it's the initial question mark because if I remove it, it works.

<div class="text-sm">
  <a href="#" class="font-medium text-blue-600 hover:text-blue-500">
-    ¿Olvidaste tu contraseña?
+    {{ '¿Olvidaste tu contraseña?' }}
  </a>
</div>

@danielroe
Copy link
Member

danielroe commented Jun 13, 2022

@frbuceta I can't reproduce with that code. Would you be able to reproduce via https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz?

@danielroe danielroe changed the title NitroPack never gets charged hang when building app with ¿ Jun 13, 2022
@ram-you
Copy link

ram-you commented Jun 13, 2022

I confirm the issue. It seems that nuxt (v3.0.0-rc4) compiler does not accept special character, ® in my case.

@pi0
Copy link
Member

pi0 commented Jun 13, 2022

Thanks for the report and confirmation. It seems a regression from a dependency of Nuxt. Please try pinning unimport to 0.2.5 using package.json:

(npm)

{
  "overrides": {
    "unimport": "0.2.5"
  }
}

(pnpm)

{
  "pnpm": {
    "overrides": {
      "unimport": "0.2.5"
    }
  }
}

(yarn)

{
  "resolutions": {
    "unimport": "0.2.5"
  }
}

@pi0
Copy link
Member

pi0 commented Jun 13, 2022

/cc @antfu Can you please check this? I think if it is hard to fix and reproduce we might revert unjs/unimport#60 and introduce it in a semver-major (0.3.x) version on unimport to avoid affecting Nuxt 3 users.

@vanling
Copy link

vanling commented Jun 13, 2022

Thanks for the report and confirmation. It seems a regression from a dependency of Nuxt. Please try pinning unimport to 0.2.5 using package.json:

🙌 This fixed it for me. Will have to check where I have used any special characters.

@antfu
Copy link
Member

antfu commented Jun 13, 2022

Fix released as unimport@0.2.8, updating your lock should fix it.

As a side note, I guess the root cause is not about special characters, but a bug of Acron that failed to parse { class: '' }, antfu/strip-literal#1. I will follow it up.

@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

6 participants