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.

v9.5.0 BasePath is effecting public folder

See original GitHub issue

Bug report

Describe the bug

BasePath is effecting public folder A clear and concise description of what the bug is. I have Updated 9.4.2 ->9.5.0,Importing the images from public folder into components Add basepath in next.config.js

module.exports = {
  basePath: '/docs',
}

Before Image Path

/static/logo/sample.png

After ImagePath

/docs/static/logo/sample.png

It should should affect only url.

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of Next.js: [e.g. 9.5.0]
  • Version of Node.js: [e.g. 12.8.3]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Manikanta-20commented, Jul 29, 2020

@timneutkens ok,But in next.js documentation, basepath will effect only url. not project/directory structure.

https://nextjs.org/docs/api-reference/next.config.js/basepath

1reaction
kushalmahajancommented, Nov 29, 2020

@timneutkens This is a valid point. Only thing breaking is public folder assets. @Manikanta-20 Practically you should use ${BASE_PATH}/image.png to avoid future break downs in case basepath changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some of public folder assets is not accessable when ...
I'm using /m basePath on this web application, and everything works great, except some files under the public folder are not accessible like ......
Read more >
Deprecate file_directory_temp() and move to FileSystem service
Problem/Motivation file_directory_temp() is a procedural function in file.inc and contains some interesting logic.
Read more >
upstart bug fix update - Oracle Linux Yum Server
This update is available via the Unbreakable Linux Network (ULN) and the Oracle Public Yum Server. Details on how to use ULN or...
Read more >
Switching from CentOS 8 to Red Hat 8 - dbi Blog
Complete! For actually converting the system to Red Hat Enterprise Linux you need access to the Red Hat portal and an active subscription...
Read more >
Next.js Redirect from / to another page - Stack Overflow
In NextJs v9.5 and above you can configure redirects and rewrites in ... configurations that may affect routing, for example next-images.
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