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

console errors occur when build with no-ssr mode #14908

Closed
kaaaanon opened this issue Sep 15, 2022 · 5 comments
Closed

console errors occur when build with no-ssr mode #14908

kaaaanon opened this issue Sep 15, 2022 · 5 comments

Comments

@kaaaanon
Copy link

kaaaanon commented Sep 15, 2022

Environment

  • Operating System: Windows_NT
  • Node Version: v16.13.1
  • Nuxt Version: 3.0.0-rc.10
  • Nitro Version: 0.5.3
  • Package Manager: npm@8.1.2
  • Builder: vite
  • User Config: ssr, target, app
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  1. create a new project by using npx nuxi init nuxt-app
  2. edit nuxt.config.ts as below
import { defineNuxtConfig } from 'nuxt'
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
  ssr: false,
  target: 'static',
  app: {
    baseURL: '/',
  }
})
  1. npm run build
  2. deploy .outopt/public/* on web server root (linux server using Apache)

Describe the bug

When accessing the server on the browser, no contents are shown on the page and I can see several errors.

  • error 1:
    GET https://example.com/index.html/_payload.js net::ERR_ABORTED 404
    
  • error 2:
    Refused to apply style from 'https://example.com/_nuxt/entry.3571d144.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
    
  • error 3:
    entry.7d6d0124.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'baseURL')
        at fa (entry.7d6d0124.js:1:65263)
        at entry.7d6d0124.js:1:100806
    

Is there any miss-settings on the nuxt.config.ts?

Additional context

I could deploy by the same way until 3.0.0-rc.5.

Logs

No response

@danielroe
Copy link
Member

danielroe commented Sep 15, 2022

The payload issue should be resolved in the edge channel via nuxt/framework#7535.

@danielroe danielroe reopened this Sep 15, 2022
@danielroe
Copy link
Member

Confirmed, the other issues are also resolved. 👍

@kaaaanon
Copy link
Author

@danielroe
Thank you for confirmation.
Does it mean all issues will be resolved on the next release?
(I am worried that my configuration is wrong.)

Copy link
Member

Yes, they will, and you can also try it out now on the edge channel (docs in previous comment).

@kaaaanon
Copy link
Author

Understand! Thank you!

@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