Comments (5)
Agreed, this bug silently broke redirection-links for us where we sometimes use different base-paths depending on the environment. I feel like we should be able to expect it to be evaluated as a string when set like one.
NEXT_PUBLIC_BASE_PATH=''
As a temporary fix we reverted to 14.1.4 in wait for a real fix
from next.js.
Nice catch! I've made a PR for it, hopefully it gets reviewed soon
from next.js.
It's pretty much an ordinary nextjs setup with
NEXT_PUBLIC_BASE_PATH=''
in .env, then I'm using it in a utilities function that's returning:${window.location.origin}${process.env.NEXT_PUBLIC_BASE_PATH}
, where it's then called from a function within a page component like:${appURL()}${path}
to create a url. All of which have worked fine before.
Alright, then yea I think this should also cover that.
from next.js.
Agreed, this bug silently broke redirection-links for us where we sometimes use different base-paths depending on the environment. I feel like we should be able to expect it to be evaluated as a string when set like one. NEXT_PUBLIC_BASE_PATH=''
As a temporary fix we reverted to 14.1.4 in wait for a real fix
@timlindsk hi, could you show us a small reproduction set of steps, or better yet a repository? I would like to verify that the proposed fix also fixes your issue.
from next.js.
It's pretty much an ordinary nextjs setup with NEXT_PUBLIC_BASE_PATH=''
in .env, then I'm using it in a utilities function that's returning:
${window.location.origin}${process.env.NEXT_PUBLIC_BASE_PATH}
, where it's then called from a function within a page component like: ${appURL()}${path}
to create a url. All of which have worked fine before.
Sidenote, separate issue, while troubleshooting: I also stumbled upon an issue where compiling mui/icons-material ended up in a crash because "use strict"; was on top of "use client"; But I have yet to boil down the root of that problem, it seems to be related to a later version of nextjs, but I'm also not sure as what the best practice is regarding it, if they should be switched around by mui/icons-material I mean, or if nextjs should allow for it. Can't seem to find much about it other than the case where there's no "use client"; at all. Any pointer?
from next.js.
Related Issues (20)
- issue with `use`, string value works but object value fails to compile HOT 3
- Import with top level await stucks dev server with `--turbo` HOT 1
- lint TP1006
- Next.js caches GraphQL API requests using fetch HOT 4
- next-navigation(useRouter().push("/url")) does not redirect to /url if server actions is used immediately after useRouter().push("/url") HOT 2
- `next build` failing to build static pages on pages router due to `Error: NextRouter was not mounted` HOT 1
- Standalone export broken HOT 7
- Intercepting Routes fail silently when (empty) `pages` directory is still present
- Module parse failed: Unexpected token (Export Enum)
- ES Modules may not assign module.exports or exports.*, Use ESM export syntax
- Cannot compile /instrumentation whilst using babel since 14.2
- Nextjs Vercel Deployment issue if I use a path to an existing, large folder in a string without file access.
- _next/image post deployment throws "url parameter is required" HOT 1
- _next/image post deployment throws "url parameter is required"
- useReportWebVitals doesn't report attribution property (webVitalsAttribution experimental feature)
- RSC and CDN interaction makes next.js inefficient for highload projects HOT 3
- Parallel routes loading both components even in conditional state HOT 1
- appear "Error: Connection Closed." in static export page by next 14.2.3 HOT 1
- Next App Router (14.2.3) - Inconsistent Singleton HOT 2
- Async function in page.tsx HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.