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

Having issues accessing the images stored under src/public directory #27661

Closed
nicholas5538 opened this issue Jun 17, 2024 · 1 comment
Closed

Comments

@nicholas5538
Copy link

nicholas5538 commented Jun 17, 2024

Summary (generated):

An issue report is being submitted about a problem with accessing assets in the public folder after updating the Nuxt version from 3.11.x to 3.12.x. The issue occurs when trying to access assets in the public folder located under the src folder. Despite reconfiguring the nuxt-config.ts file, the problem persists. The issue has not been tested in production mode, but the user can no longer see images in the assets tab of the Nuxt devtools.


Environment

Development

Reproduction

nicholas5538/portfolio-vue#51

Describe the bug

I can no longer access my assets in the public folder when I updated the nuxt version from 3.11.x to 3.12.x. My public folder is under the src folder, I have tried to reconfigure nuxt-config.ts but to no avail.

I have not tested this in production mode, but I can no longer see my images under the assets tab on the nuxt devtools.

Additional context

No response

Logs

image

@nuxtbot nuxtbot changed the title Can no longer access images under public directory when it is in dev mode "I'm trying to access an image that is located in the public directory of my rails application, but when I'm in development mode, I get a routing error. The image URL is something like 'http://localhost:3000/images/logo.png', but the image doesn't load. In production mode, the image loads fine. I've tried using the Rails.application.assets.compile command in the console, but that doesn't work. Has anyone else seen this issue?" Jun 17, 2024
@nicholas5538 nicholas5538 changed the title "I'm trying to access an image that is located in the public directory of my rails application, but when I'm in development mode, I get a routing error. The image URL is something like 'http://localhost:3000/images/logo.png', but the image doesn't load. In production mode, the image loads fine. I've tried using the Rails.application.assets.compile command in the console, but that doesn't work. Has anyone else seen this issue?" Having issues accessing the images stored under src/public directory Jun 17, 2024
@danielroe
Copy link
Member

One of the steps when migrating to compatibilityVersion: 4 is to move your public/ and server/ folders out of the src/ directory and into the root. This is a little different from the normal migration steps as you already have a srcDir which is not set to app/.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
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