question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

console errors occur when build with no-ssr mode

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Sep 15, 2022

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

1reaction
danielroecommented, Sep 15, 2022

The payload issue should be resolved in the edge channel via https://github.com/nuxt/framework/pull/7535.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Showing console errors and alerts in a div inside the page
I'm building a debugging tool for my web app and I need to show console errors in a div. I know I can...
Read more >
Fix JavaScript errors that are reported in the Console
In this article. Fix JavaScript errors; Find and debug network issues; Create errors and traces in the Console; See also.
Read more >
Error reporting in production · Issue #2686 · facebook/react
Unfortunately, the error message that React throws in production mode is pretty useless, so we wind up with a lot of unactionable reporting....
Read more >
Getting Started With Testing in Python
In this in-depth tutorial, you'll see how to create Python unit tests, ... Here you can see how a mistake in your code...
Read more >
Integrated BMC Web Console User Guide for Intel® Server ...
The products described may contain design defects or errors known as errata, which may cause the product to deviate from published specifications. Current ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found