Skip to content

fix: ssr require module failing with "Cannot find module './emojis'"#1784

Merged
atinux merged 4 commits intonuxt:mainfrom
mhoffrog:bugfix/issue_1783_ssr_require_module
Feb 25, 2025
Merged

fix: ssr require module failing with "Cannot find module './emojis'"#1784
atinux merged 4 commits intonuxt:mainfrom
mhoffrog:bugfix/issue_1783_ssr_require_module

Conversation

@mhoffrog
Copy link
Contributor

@mhoffrog mhoffrog commented Feb 10, 2025

🔗 Linked issue

#1783

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This kind of issue was determined with Nuxt v3.15.3 only see nuxt-modules/MDC issue#318 for reference.

It has been fixed in Nuxt v3.15.4 by Nuxt PR fix(vite): restore externality for dev server externals #30802.

So this issue can be fixed by upgrading dependencies

  • update package.json:

    • dependencies:
      • nuxt ^3.15.3 -> ^3.15.4
      • @iconify-json/octicon ^1.2.2 -> ^1.2.4
      • @iconify-json/simple-icon ^1.2.22 -> ^1.2.24
    • devDependencies:
      • @nuxt/eslint ^1.0.0 -> ^1.0.1
      • eslint ^9.19.0 -> ^9.20.0
      • shiki ^2.1.0 -> ^2.3.2
      • vitest ^3.0.4 -> ^3.0.5
  • re-build pnpm-lock.yaml

Known Issue

Nuxt 3.15.4 is coming with a dependency update of @nuxt/cli to 3.21.1. This update fixes the typecheck command to let the node process end with an exit code <>0 if there are typecheck errors found. This is currently breaking this projects GitHub Action ci.xml. Fixing this projects typecheck violations should be subject of another PR.
See @nuxt/cli fix: throw when errors are #encountered

Test Results

image

No error is thrown anymore:
image

Page is rendering as expected:
image
image
image

- update package.json:
  - dependencies:
    - nuxt ^3.15.3 -> ^3.15.4
    - @iconify-json/octicon ^1.2.2 -> ^1.2.4
    - @iconify-json/simple-icon ^1.2.22 -> ^1.2.24
  - devDependencies:
    - @nuxt/eslint ^1.0.0 -> ^1.0.1
    - eslint ^9.19.0 -> ^9.20.0
    - shiki ^2.1.0 -> ^2.3.2
    - vitest ^3.0.4 -> ^3.0.5

- re-build pnpm-lock.yaml

closes nuxt#1783
@mhoffrog mhoffrog changed the title Update to fix ssr require module failing with "Cannot find module './emojis'" fix: ssr require module failing with "Cannot find module './emojis'" Feb 10, 2025
@atinux atinux merged commit 0b309d3 into nuxt:main Feb 25, 2025
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants