FG

Vercel

138 verified issues

🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Next 9.5.1 out of memory after some hot reloads

Bug report Describe the bug Since updating to 9.5.x (from 9.4.x), i get an out of memory error after 10 something hot reloads: `FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory` it did rarely happen in 9.4.1, but it happens very consistantly in 9.5.x To Reproduce thats probably tricky. it happens on big projects and might be related to some bug in the hot reload / rebuild. Maybe it happens when there are some import circles? Expected behavior nextjs should not go out-of-memory System information - OS:macOS - Browser: chrome - Version of Next.js: 9.5.1 - Version of Node.js: 12.13.1 Additional information we are using a custom server with typescript

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

`createMany()` should return the created records

Initially brought up here: https://github.com/prisma/prisma/issues/4998#issuecomment-787206842 Problem The fact that the `createMany` API does not return the created records (which should be possible for Postgres) makes it difficult/impossible to use in some circumstances, meaning we must fall back to raw SQL. Here's an example. Let's say I have these two tables [code block] Let's say I want to create many posts and many comments. The data to be created could be represented like so: `Array<{post: PostData, comments: Array<CommentData>}>`. If `createMany` returned the created data, I could do something like this: [code block] However, since `createMany` does not return the created data, it is difficult to create many posts and then create many comments linked to those posts in an efficient manner. The remaining options are to create records one-by-one or use raw SQL. Using a combination of `createMany` and `findMany` is possible if you manually specify IDs, but does not work if you rely on Postgres (or some other DB) to generate IDs by default. Suggested solution `createMany` should return an array of created records (like how `create` returns the single created record). Alternatives Use `create` (inefficient if creating many records) Use raw SQL (efficient but inconvenient) * Use `createMany` + `findMany` (only works if you manually specify IDs, and also less efficient than if `createMany` returned created records) Additional context Personally, I've used raw

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Hot reload not working at latest version of Next.js

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ Link to the code that reproduces this issue or a replay of the bug - To Reproduce 1. npx create-next-app@latest (next-tw) 2. yarn install 3. yarn dev Describe the Bug [code block] Expected Behavior Hot reload should work Which browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Top-level app component and animated route transitions

Having animated route transitions would be nice, as this is one of the many benefits through client-side routing. Doing so should be left up to the user in my opinion (some people prefer CSS transitions over more fine-grained control with `react-motion` etc). As I understand it, one would need to modify the top-level App component. The client entry file seems to look for a globally assigned `__NEXT_DATA__.app` variable but I can't find any documentation on that.

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

[Next 9] out of memory when building the app

Bug report Describe the bug Moving an application from Next 8 to Next 9. When I run `next build` the process goes out of memory and it cannot build the application. FYI, it's an application with 20 routes more or less. To Reproduce That's hard to reproduce as I don't have any idea what went wrong. Next 8 compiles without issue but not Next9. Here's the stack trace. If you know how to get a more descriptive output, let me know and I will provide: [code block] Expected behavior It should build Screenshots If applicable, add screenshots to help explain your problem. System information - OS: macOS - Node: 10.13.0 (it will have to work with node 8.X too) - Version of Next.js: 9.0.1 Additional context Add any other context about the problem here.

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[NEXT-684] Fast-refresh for CSS files is not working in Firefox

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] What browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_ Describe the Bug So I just started a new next.js app using the `v13.0.5` with the experimental `app` folder. I noticed that CSS changes are not correctly updated in the browser. The browser is notified of the change, but the styles are not applied - if I manually refresh the browser I can see the correct styles. I also tried the canary version and the error still exists. Moving to `v13.0.4` seems to work fine. And I also tried with Tailwind following the beta documentation and also it doesn't work. Expected Behavior Updating styles should fast refresh and update the page with the new styles. Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster https://stackblitz.com/edit/vercel-next-js-viybne?file=app/global.css To Reproduce Open the `global.css` file, change the colors and save the file. You can see it working with the 13.0.4: https://stackblitz.com/edit/vercel-next-js-6sncvk?file=app/global.css <sub>NEXT-684</sub>

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Support for AWS Secrets Manager or Azure KeyVault in `schema.prisma`

Problem I'm using Prisma only to manage my database schema, not for the CRUD operations in code. The problem is that the schema.prisma file only supports defining the datasource URL using values defined in a file (dotenv). Since I don't want to store the database credentials in my project I'd like to obtain them from AWS Secrets Manager service. Suggested solution Provide a mechanism like a callback function to defined the datasource URL.

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[NEXT-1147] Scroll position is reset when search params are updated

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/modest-gould-h4nlvd?file=%2Fapp%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A7%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A7%7D%5D To Reproduce Click the counter to update client state. Scroll a little. Click the second button to update search params. The client state is preserved, but the scroll position is lost. Describe the Bug Context In Next <= 13.2.4, updating search params was working as intended : client state was kept, and scroll position was kept too. In Next 13.2.5, a regression made the client components unmount and remount when search params were updated. @feedthejim fixed that unmounting in https://github.com/vercel/next.js/pull/49047 (it's testable on `13.3.5-canary.2`), but there is still an issue now: scroll position is lost on search params updates. Problem: persisting state in search params is very important with the App router - that's a clean way for client components to request updated data from the RSC. Reproduction Codesandbox Here's a codesandbox reproducing the bug: https://codesandbox.io/p/sandbox/modest-gould-h4nlvd?file=%2Fapp%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A7%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A7%7D%5D In video https://user-

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Use `JOIN`s in more queries

Problem Currently, there is no way to join tables together. Queries that include relations only include the relational data by using separate queries. Suggested solution I am hoping this can be implemented without a breaking API change. I would like to see a single query executed that joins multiple tables when necessary rather than a set of queries, each referencing a related table. Alternatives The only alternative I can see is to use raw queries.

Confidence95%
95%
Candidate Fix
2 fixes
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Support for `Json` field type in SQLite

Problem SQLite has had support for JSON field type for a while. `Sequelize` supports this field type on par with Postgres and MySQL. Lack of support for this field type by Prisma is preventing us from porting over our project. SQLite is a great bootstrapping technology that allows developers to quickly prototype applications without introducing new dependencies such as docker or worry about running yet another service in the development flow. JSON field type gives us the option to have a `nosql` database colocated in a `sql` database. Suggested solution Please implement support for this feature. See JSON ~~Extension~~ documentation and refer to `Sequelize`'s implementation if required. Alternatives Defer migration to Prisma and stick with `Sequelize`. Maintain status quo. Additional context cc: @ryands17 ref: https://github.com/prisma/prisma/discussions/3575

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[NEXT-1192] Failed to find font override - next/font/google

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) Font optimization (@next/font) Link to the code that reproduces this issue https://github.com/maxencerb/next-font-bug To Reproduce [code block] [code block] Describe the Bug Output Output works as expected Console Output [code block] Explaination All fallback font metrics from google are loaded from `next/font/google/get-fallback-font-override-metrics.ts` where we can see the following method and doc : [code block] So I think there might be a fix but I don't really know how to implement it. I tried looking at the local font optimization code. Maybe someone can either find the solution to calculate the values with fontkit or at least update the json file under `next/src/server/google-font-metrics.json` and tell how to find those values. Expected Behavior Find the font fallback for any google font Which browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_ <sub>NEXT-1192</sub>

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Make cuid2 available in `@default`

Problem `cuid()` is deprecated now due to security reasons, can we let `cuid2` be an option when generating ids?

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Static Generation / SSG Improvements

Summary Allow Next.js to become fully hybrid by providing methods to do both static generation and server-side rendering on a per-page basis. - Two new per-page data fetching methods - `getStaticProps` - Opt-in to static generation (SSG) at `next build` time. - `getServerSideProps` - Opt-in to server-side rendering (SSR) which renders on-demand. - A new method for statically generating (SSG) a set of routes from dynamic sources - `getStaticPaths` - Return list of parameters for dynamic routes to do static generation (SSG) This RFC exclusively discusses API additions. All new functionality is completely backwards compatible and can be incrementally adopted. This RFC introduces no deprecations. Background When building websites or web applications you generally have to choose between 2 strategies: Static generation (SSG) or server-side rendering (SSR). Next.js instead lets you build hybrid applications that allow you to choose per-page which strategy is used. Starting with Next.js 9, pages without `getInitialProps` get statically optimized and output as `.html` files upon `next build`. However, you might want to do data fetching while generating static pages for your specific use case. For example, to statically generate marketing pages from a CMS or a blog section of the site. Using `getInitialProps` would opt you into SSR in that case. Next.js currently has a `next export` command, that makes the application fully SSG, losing the hybrid nature of Next.js. If

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Make the MongoDB Replica Set Requirement Optional in Development

Problem MongoDB only allows you to start a transaction on a replica set. Prisma uses transactions internally to avoid partial writes on nested queries. This means we inherit the requirement of needing a replica set configured. This makes our getting started experience more cumbersome because a locally installed MongoDB doesn't have the replica set configured by default. If you try running Prisma against a MongoDB without a replica set, you get the following error: [code block] Suggested solution We should find a way to make this requirement optional, at least during development. In production, most people will host their MongoDB instance with the replica set configured. Alternatives Right now we recommend that you use MongoDB Atlas to launch a free instance that has replica set support out of the box. There's also an option to run the replica set locally with this guide: https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set/

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

MongoDB support for Prisma 2+

Our team is considering working with Prisma, but as Prisma 1 seems to go out of scope and prisma 2 not mongo ready yet would love to know when is support expected to be released? a week? a month ? 2021 ?

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Segmentation fault crash when using prisma client when using PostgreSQL

Bug description When trying to use `findMany()` (or any other method) on a model, prisma client crashes and the following line appears in my log: `Segmentation fault (core dumped)`. This only happens if I use PostgreSQL as far as I know, this first appeared when I switched to PostgreSQL from mysql. How to reproduce 1. Initiate a new prisma project (make sure to use PostgreSQL) and generate the client - no errors there 2. Write a simple client which fetches some data from the databse 3. The script crashes and `Segmentation fault (core dumped)` gets logged in the console Expected behavior The script does not crash. Prisma information Example schema: [code block] Example test client: [code block] Environment & setup - OS: Pop!_OS (`Linux pop-os 5.15.5-76051505-generic #202111250933~1638201579~21.04~09f1aa7-Ubuntu SMP Tue Nov 30 02: x86_64 x86_64 x86_64 GNU/Linux`) - Database: PostgreSQL v14.1 (Ubuntu 14.1-1.pgdg21.04+1) - Node.js version: v17.2.0 Prisma Version [code block]

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Be able to update or retrieve a single record including non-unique fields in the "where" conditions.

Problem I am unable to utilize non-unique fields in single update queries. To be clear, I want to still use the unique fields, I just want to filter it down even more. Suggested solution Here are my models [code block] I have "people" who have "clients" attached to them. Only the person who owns the client can update the name. So when an API call comes in, I know who the current person is and what client they're trying to update. So the update query I would like to use is this: [code block] but it only allows fields which are marked as `@unique` or `@id` Alternatives One alternative is to do a `.findUnique({ where: { id: input.clientId } })` and then check if the personId of the client is the same as the one passed in. This however creates two database calls where only one is needed. Another alternative is to do a `.updateMany({ where: { id: input.clientId, personId: input.personId } })` but I don't get any of the clients back. If I got the clients back in the query and if there was a `limit` I could pass in to limit it to one, I would feel better about this so it wouldn't have to do any unneeded scans of the rows, but it still feels less idiomatic than updating the `.update()` command to allow for non-unique fields.

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Support Oracle DB

Problem Support to Oracle db

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Tree shaking doesn't work with Typescript barrel files

Bug report I originally raised this as a discussion, but now I think it's a bug. Describe the bug When using a barrel file to re-export components from a single location, tree-shaking does not function correctly. To Reproduce I'm using Next 9.3.6 and I've arranged my components like: [code block] Each component file exports a single component, like this: [code block] index.ts is a barrel file that re-exports from each individual component file: [code block] I then use a couple of components in _app.tsx like: [code block] There's about 100 components defined, and only a couple are used in _app.tsx. But when I analyze the bundle I have a very large chunk, shared by all pages, and it contains all my components, resulting in an inflated app page size: <img width="748" alt="Screenshot 2020-05-06 09 35 32" src="https://user-images.githubusercontent.com/425787/81183292-f8bbdf00-8f7c-11ea-91c9-4b95adff907a.png"> I use a similar import strategy within pages, and every one of them appears to contain every component. my tsconfig.json is: [code block] and I'm using next's native support for the baseUrl field. I haven't changed the module or the target. When I change the _app.tsx imports to: [code block] the common bundle and app page size drops dramatically, as I would expect it to: <img width="751" alt="Screenshot 2020-05-06 09 34 21" src="https://user-images.githubusercontent.com/425787/81183384-1be68e80-8f7d-11ea-9aed-e32a1d871ab9.png"> Expected behavior The a

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

[Proposal] Prisma Client Extensions

Client Extensions Proposal Hey folks, we started designing this feature and we’re ready to share our proposal. Please let us know what you think! Design We aim to provide you with a type-safe way to extend your Prisma Client to support many new use-cases and also give a way to express your creativity. We plan to work on four extension layers which are `$result`, `$model`, `$client`, `$use`. Let’s consider the following model: [code block] Computed fields We have this database model but we want to β€œaugment” it at runtime. We want to add fields to our query results, have them computed at runtime, and let our own types flow through. To do this, we use `$result` to extend the results: [code block] We just extended our `User` model results with a new field called `fullName`. To do that, we defined our field with `compute`, where we expressed our field dependencies and computation logic. [code block] Result extensions will never over-fetch. It means that we only compute if we are able to: [code block] Finally, you will be able to add fields to all your model results at once via a generic call using `$all` instead of a model name: [code block] Results are never computed ahead of time, but only on access for performance reasons. Model methods Extending the results is useful, but we would also love to store some custom logic on our models too… so that we can encapsulate repetitive logic, or business logic. To do this, we want to use the new `$model` extension capabil

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Support ES6 modules export / ESM

It would be great if the Prisma Client JS generator would be compatible with ES6 modules out of the box. Note: Related to prisma/prisma-client-js#175

Confidence95%
95%
Candidate Fix
2 fixes
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Support for splitting Prisma schema into multiple files

Problem Prisma currently only supports one single Prisma Schema file. Developers want more flexibility for managing their Prisma Schema files. Motivations: breaking up large schema files to make them more manageable flexible integration with certain architectures, i.e. each module has its own self-contained logic including its schema Solution Support importing additional schema files, i.e. `import "user.schema"`, `import models/.prisma` or `import modules//.prisma`. Alternatives Not researched at this time. Additional context https://github.com/prisma/prisma/issues/92

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[Bug] next/link is not calling the server for subsequent navigations on dynamic routes

Describe the feature you'd like to request In the documentation it is said that the conditions for hard navigation are : - when navigating between dynamic segments - When navigating between two different group layouts (ex: from `(groupA)/layout` to `(groupB)/layout` ) I'd like to suggest also adding hard navigation for segments marked with `dynamic='force-dynamic'` or when using dynamic functions and even when using fetch with `cache: 'no-store'`. In the docs you said that using these configurations is like using `getServerSideProps()` in the pages directory, but it does not behave the same between navigations which is quite confusing. Use cases for this feature could be these : - this app that only store pokemon data in cookies (Live here and source here) - this simple case for an app that generate a random number each time : ckblitz.com/edit/nextjs-sxijav?file=package.json,app%2Fnested%2Fpage.tsx Describe the solution you'd like The solution i propose is to consider hard navigation for these cases : - When navigating to a page marked with `dynamic='force-dynamic'`, next should always do a hard navigation - When navigating to a page using dynamic functions `headers()` and `cookies()`, next should always do a hard navigation - When navigating to a page using `fetch` with `cache: 'no-store'`, next should always do a hard navigation, or at least next should always refetch the data - When navigating to a page using either `fetch` with `next: { revalidate: n_seconds

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Subscriptions/real-time API support

Unfortunately at the current point of time Prisma 2 doesn't yet support subscriptions (real-time API features). Prisma 1 followed a different architecture which provided support for subscriptions. We might be planning to bring back real-time/subscriptions functionality in the future based on a standalone "events engine" (which will use CDC under the hood). This issue tracks the progress for this feature. Please feel free to share your specific requirements and wishes for this feature. πŸ™

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[NEXT-1308] Css is imported multiple times and out of order in /app dir

Verify canary release [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true) Link to the code that reproduces this issue or a replay of the bug https://github.com/ssijak/next-css-issue-not-working-simple To Reproduce Just start the app and check the styling on the buttons. Styles are imported multiple times wherever `Button` was used (page and layout) and order is also not deterministic, so it can be imported in different order on different app runs. This is another/same simple repro difference is just that it uses turbo and transpiles the UI lib, I started with that but figured that the issue is happening without it too https://github.com/ssijak/next-css-issue-not-working Describe the Bug \-Same styles are imported multiple times \-Order of imports is not deterministic Screenshot: https://share.cleanshot.com/nq35j7vh Expected Behavior Same styles should be imported once. Starting the app multiple times should not produce different results (ordering of CSS, impacting specificity) Which browser are you using? (if relevant) No response How are you deploying your application? (if relevant) No response* <sub>From SyncLinear.com | NEXT-1308</sub>

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Scroll restoration happens too early before the page gets rendered after hitting browser back button

- [x] I have searched the issues of this repository and believe that this is not a duplicate. After transiting from one page to another page via next `<Link />`, if user clicks the back button and the previous page has `getInitialProps` method that takes some time to finish, the scroll position of the previous will be restored before the previous pages gets rendered. Demo source code can be found here After clicking back button, the "go back" text should still be visible (not scroll down to previous position) until the previous page gets rendered

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Use with React Router 4

Is it possible to use next.js with the new react router v4?

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Verify CSS import ordering

A user on twitter reported that Next.js may not order CSS imports from JS correctly. We need to investigate and fix this! https://twitter.com/samselikoff/status/1299032241100787712 <sub>NEXT-1350</sub>

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Custom Cache-Control response header for `/_next/image`

Bug report Describe the bug When requesting `/_next/image(.)`, I'm getting this Response header: [code block] And it's fine... What's not fine is that I'm getting the same exact Response headers even when I use custom headers in `next.config.js`, i.e.: [code block] To Reproduce Try this `next.config.js` above, with an image that uses common `<img>` tag like this: [code block] And another tag that uses the new `next/image` component, with the same or whatever image url, for example: [code block] And try requesting those images in the browser, and look into `Devtools -> Network` tab, the Response headers, and see that for common `<img>` tag it's actually changed, whereas for new `<Image>` component it is not. Expected behavior For `/_next/image(.)` urls, I expected to see Headers that I setup, i.e. `Cache-Control: public, max-age=180, s-maxage=180, stale-while-revalidate=180`. Screenshots Common `<img>`: New `<Image>`: System information - OS: not applicable / any - Browser (if applies): not applicable / any - Version of Next.js: 10.0.3 - Version of Node.js: 12.18.0 - Deployment: both `next start` on development machine, and actual Vercel deployment (screenshots demonstrate the case with local machine, but I've confirmed that the same is happening on a Vercel deployment) Additional context Originally I created an issue using "Feature request" template, and it got translated into "Idea discussion": https://github.com/vercel/next.js/discussions/19896 (how to d

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Conditional uniqueness constraints; Partial/Filtered (Unique) Indexes

Problem I would like to be able to define a uniqueness constraint that has conditional elements to it so that it can map to and align with a conditional unique index/constraint within the database. Suggested solution Modify the `@@unique` modifier to include a `where: { }` argument that could define the condition that allows this to be unique.

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

next-lint Doesn't Support ESLint 9

Link to the code that reproduces this issue https://codesandbox.io/p/devbox/vigilant-pine-6wmz8y To Reproduce 1. Add `next lint` script to package.json per https://nextjs.org/docs/app/building-your-application/configuring/eslint 2. Add `.eslintrc.json` to project per https://nextjs.org/docs/app/building-your-application/configuring/eslint [code block] 3. Run lint and get an error [code block] Current vs. Expected behavior Expected lint to run successfully, but it failed with errors. Provide environment information [code block] Which area(s) are affected? (Select all that apply) ESLint (eslint-config-next) Which stage(s) are affected? (Select all that apply) next dev (local), next build (local), next start (local) Additional context It looks like this is coming from https://github.com/vercel/next.js/blob/canary/packages/next/src/cli/next-lint.ts. This needs to be changed to support ESLint 9's flat config https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config. The migration guide is at https://eslint.org/docs/latest/use/configure/migration-guide <sub>NEXT-3112</sub>

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[NEXT-841] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

What version of Next.js are you using? 12.0.7 What version of Node.js are you using? 16.6.2 What browser are you using? Chrome / safari What operating system are you using? Mac os How are you deploying your application? other Describe the Bug We have a monorepo with nx wherein we are using next for ssr We have been on next 11 and wanted to move to the next 12 with swc On doing so and making the neccessary changes, our app crashes with We have tried adding more memory but we feel that the issue lies elsewhere [code block] Expected Behavior Should work To Reproduce - upgrade to next 12.0.7 / 12.0.4 and try running the dev server <sub>NEXT-841</sub>

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

[NEXT-1187] Link navigation with loading.tsx is not instant for dynamic pages

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.0.6-canary.2 eslint-config-next: 13.0.5 react: 18.2.0 react-dom: 18.2.0 Which area of Next.js is affected? (leave empty if unsure) App directory (appDir: true), Routing (next/router, next/navigation, next/link) Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster https://github.com/tonypizzicato/next-13-loading To Reproduce - pull the repo - run `yarn install && yarn dev` - open `localhost:3000` in the browser - go to the "Careers" page - reload the page - set some throttling in devtools - click different pages in the menu - notice that "Careers" page loading state and route change are done instantly but with some delay for other pages Describe the Bug When you have a dynamic page with `loading.tsx` the route change and showing the loading animation are instant only for the page, which was freshly loaded. For other dynamic pages it hits the server first, then shows the loading state <img width="193" alt="Screenshot 2022-11-29 at 23 19 38" src="https://user-images.

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

CSS module styling is removed too early on route changes

Bug report Describe the bug CSS module styling is removed immediately after clicking a `next/link`, instead of after the DOM is removed on production builds. This causes the components to have no styling at all during a page transition. This issue does not happen on dev mode. I believe this is a bug with CSS modules specifically because components styled with `styled-jsx` don't have this problem. Really would love to be able to use Sass via CSS modules here instead of re-writing the entire app I'm working on using `styled-jsx`. If Sass modules can't work in this scenario, I think I would be forced to use `styled-jsx`, which is not my preferred method of styling my components for this project. To Reproduce I have created repos, and deployed these repos to demonstrate the problem using framer-motion for page transitions. If you were to pull these repos and run them locally using `npm run dev`, you will see that the flash of unstyled content does not happen on any one of them in dev mode. However, on their deployed sites, you can see the flash of unstyled content with CSS modules and Sass modules. styled-jsx Behavior: correct, no flash of unstyled content Deployed site on Vercel Repo CSS modules Behavior: buggy, there is a flash of unstyled content immediately after clicking the link Deployed site on Vercel Repo Sass via CSS modules (additional) Behavior: buggy, there is a flash of unstyled content immediately after clicking the link (same as CSS modules) Deployed

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Add support for PlanetScale serverless driver

Problem PlanetScale offers a serverless driver for environments like Cloudflare Workers and Deno Deploy, but Prisma does not have support for it. Suggested solution Adding a PlanetScale serverless driver to Prisma would solve this problem. I don't know the internals of Prisma, but PlanetScale's serverless driver is MySQL-compatible, just over HTTP. I imagine one could potentially reuse code from Prisma's existing MySQL driver to achieve this. Alternatives You could use the Prisma Data Proxy with PlanetScale, but it's an additional layer to jump through and adds an additional service to worry about.

Confidence95%
95%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshabout 20 hours ago

Support querying across multiple schemas

Right now with Prisma, you can query across one schema at a time but in many cases, you need to query across multiple tables stored across multiple database schemas. We need to make certain product decision to enable this like how we are going to add this schema metadata information to the model and other implementation details that are necessary to be handled for this.

Confidence95%
95%
Candidate Fix
2 fixes
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Invalid hook call in 9.0.6

Bug report Describe the bug When you use react a component residing outside the main Next.js project folder which uses hooks. You end up getting `Invalid hook call` error and the application breaks. Components without hooks work as expected. The bug appears in all versions `>9.0.5` when you change the webpack config so that files outside the main folder are transpiled. It’s working fine in `<=9.0.5` To Reproduce Check out the repro at https://github.com/baldurh/next-9.0.6-bug-repro Expected behavior The code should not break when using files outside the project folder. System information - OS: N/A - Browser: N/A - Version of Next.js: `>=9.0.6` Additional context I know this is probably not a common use of Next.js but in our project we’re using a monorepo and have a shared folder with components used by multiple applications. It would be nice to get this working again. If someone finds an alternative config we could use I’d also be happy to do that πŸ™‚

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

Next.js API routes (and pages) should support reading files

Feature request Is your feature request related to a problem? Please describe. It's currently not possible to read files from API routes or pages. Describe the solution you'd like I want to be able to call `fs.readFile` with a `__dirname` path and have it "just work". This should work in Development and Production mode. Describe alternatives you've considered This may need to integrate with `@zeit/webpack-asset-relocator-loader` in some capacity. This plugin handles these types of requires. However, it's not a necessity. I'd be OK with something that _only_ works with `__dirname` and `__filename` (no relative or cwd-based paths). Additional context Example: [code block] > Note: I know you can cheat the above example ☝️ with `require`, but that's not the point. πŸ˜„

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 20 hours ago

How to catch and handle errors to report logs on server side

Hi, I'm in the situation where we want to sent errors, both on server and client side, to Sentry tool. Our app uses Express as a custom server. Basically we create an express app, apply some middlewares but delegate all the real job to the next.js handle: [code block] With this approach next.js takes control over the rendering process and any error is catch by next.js and the only way I have to process it is overriding the `_error.js` page file. Within that `_error.js` file I need a universal way to report errors to Sentry. Currently there are two libraries (`raven` for node and `raven-js` por javascript). The proble is I can't import both of them because `raven` works for SSR but fails when webpack builds the bundle, and also `raven-js` fails due XMLHTTPRequest dependency too. Is there a way I can be notified for next.js error on server side?

Confidence95%
95%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports"

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) _No response_ Link to the code that reproduces this issue sorry i can't upload because my project contains localhost database connections To Reproduce On my own server.js file, every page of my application in development mode gets the same error, while on my own server.js file in localhost in production mode, I get this error on the pages under [slug]! When I run this with my server.js file I get this error. While it then worked on 13.3.1, it's now broken! What am I missing in my server.js file or what should I do? I got this error in the last 13.3.2-canary.7 and it continued in later versions! Normally, I get this error when I refresh the pages under news-media/[slug] and other pages under news-media/[slug] while opening in production mode. I get this error on every page in development mode!"dev": "next dev", "build": "next build", While "start": "next start" was OK, as I mentioned above on my server.js file, after the "next 13.3.1" version, errors started on server.js both in development and production mode! Here's my run npm commands for my own server.js: "httpsDevelopment": "node --max_old_space_size=8192 server/server.js", "httpsProduction": "next build && node server/server.js production", My server.js file looks like this: [code block] De

Confidence94%
94%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Hight number of processes of /next/dist/compiled/jest-worker/processChild.js still alive after next build

Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 Binaries: Node: 18.13.0 npm: 8.19.3 Yarn: 1.22.19 pnpm: 7.26.2 Relevant packages: next: 12.0.9 react: 17.0.2 react-dom: 17.0.2 Which area(s) of Next.js are affected? (leave empty if unsure) CLI (create-next-app) Link to the code that reproduces this issue https://github.com/vercel/next.js/files/10565355/reproduce.zip To Reproduce reproduce.zip <img width="1492" alt="image" src="https://user-images.githubusercontent.com/3240259/216242566-6f87ae6e-e369-405f-9fca-e525e051797d.png"> This problem can reproduce above next@12.0.9, but 12.0.8 was all right. Or remove `getInitialProps` in `_app.tsx ` was all right above next@12.0.9. [code block] Describe the Bug Hight number of processes of /next/dist/compiled/jest-worker/processChild.js still alive after next build Expected Behavior Kill all child processes. Which browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_ <sub>NEXT-1348</sub>

Confidence92%
92%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Next13 caching fetched data even with the 'revalidate = 0' route segment

Verify canary release - [x] I verified that the issue exists in the latest Next.js canary release Provide environment information [code block] Which area(s) of Next.js are affected? (leave empty if unsure) App directory (appDir: true), Data fetching (gS(S)P, getInitialProps) Link to the code that reproduces this issue or a replay of the bug https://github.com/EvandrooViegas/outsystem-angola To Reproduce 1. clone my repo 2. run `npm install` in the root of the cloned repo 3. run `npm run dev` Describe the Bug Next13 seems to be caching the data coming from supabase even with the `revalidate = 0` route segment. Expected Behavior Get the freshest data in every page request Which browser are you using? (if relevant) chrome How are you deploying your application? (if relevant) _No response_

Confidence92%
92%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Fresh7 months ago

[6.x] WebAssembly.instantiate(): Import #0 "./query_compiler_bg.js": module is not an object or function]

Bug description Nitro + Prisma 6.6.0 + D1 does not work Severity 🚨 Critical: Data loss, app crash, security issue Reproduction https://github.com/medz/nitro-prisma-6.6 Expected vs. Actual Behavior Expected behavior: WASM modules can be parsed normally Frequency Consistently reproducible Does this occur in development or production? Only in development (e.g., CLI tools, migrations, Prisma Studio) Is this a regression? Prisma: 6.6.0 Nitro: 2.11.9 wrangler: 4.10.0 Workaround - Prisma Schema & Queries [code block] [code block] Logs & Debug Info [code block] Environment & Setup - OS: - Database: - Node.js version: Prisma Version [code block]

Confidence88%
88%
βœ“ Verified Fix Available
1 fixβœ“ 3 verified
πŸ—„οΈ DatabasesVercel
Freshover 6 years ago

Error with Prisma v15: can't find prisma.schema

I updated to prisma version 15 and when I run prisma2 generate in a docker environment, I receive the error: [code block] I don't see that the filename has been changed from `schema.prisma` to `prisma.schema` so this seems like a bug.

Confidence88%
88%
Candidate Fix
1 fixβœ“ 1 verified
πŸ—„οΈ DatabasesVercel
Freshover 2 years ago

Segmentation fault on ARM64 Linux

Bug description I'm using prisma in arm64 linux with openssl3 get `Segmentation fault (core dumped)` error. [code block] [code block] [code block] I can't create a reproducible case, the problem I encountered when running the https://github.com/civitai/civitai project, here's the full log for reference: <details> <summary>npm run dev</summary> [code block] </details> and version `4.12.0-integration-rtld-deepbind.3` can't fix my issue. [code block] How to reproduce I can't create a reproducible case, the problem I encountered when running the https://github.com/civitai/civitai project. Expected behavior _No response_ Prisma information schema.prisma [code block] client.ts [code block] Environment & setup - OS: Ubuntu 22.10 - Database: PostgreSQL - Node.js version: v18.15.0 Prisma Version v4.10.1 and v4.12.0-integration-rtld-deepbind.3 [code block] [code block]

Confidence87%
87%
Candidate Fix
1 fixβœ“ 2 verified
πŸ—„οΈ DatabasesVercel
Freshover 4 years ago

Preview feature feedback: Node-API support (`nApi`)

Please share your feedback about the `nApi` functionality released in v2.20.0 in this issue. - If you encounter a bug, please open a bug report in this repo. - If the feature is working well for you, please share this in a comment below or leave a πŸ‘ on this issue. If you have any questions, don't hesitate to ask them in the `#prisma-client` channel in the Prisma Slack. Known Limitations - [x] (Resolved) You can't have more than one instance of the Prisma Client yet, so this will not work properly: [code block] - [x] (Resolved) Currently, logging queries does not work with Node-API and Jest (Issue). For example, the following will not output any query logs. (_Note_: This seems to only be the case when using jest) [code block] - [x] (Resolved) Node-API libraries do not work with process mocking of Jest (issue) - [x] Node-API does not work on M1 ARM Macs, Apple Silicon (issue) - [ ] Node-API does not work on 32bit Node (issue)

Confidence86%
86%
βœ“ Verified Fix Available
1 fixβœ“ 3 verified
πŸ—„οΈ DatabasesVercel
Freshabout 19 hours ago

upsert across HTTP requests has a race condition

Bug description Situation: I have a model with a unique string. At the beginning I have an empty database. I want to create or update an object of the model with upsert and check if the object exists by searching for the unique string. If I call several upserts with the same unique string at the same time, I expect it to be created once and then updated if necessary. But it is created once and then the error occurs: Unique constraint failed on the fields. [code block] How to reproduce Expected behavior I expect it to be created once and then updated the just created object, instead of crashing. Prisma information [code block] Environment & setup - OS: Mac OS, - Database: PostgreSQL - Node.js version: v13.3.0 - Prisma version: 2.3.0 [code block]

Confidence85%
85%
Candidate Fix
1 fix
🌐 Web & Full-StackVercel
Freshabout 19 hours ago

Stuck on `Creating an optimized production build` forever when development server is running

Verify canary release - [x] I verified that the issue exists in Next.js canary release Provide environment information Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 16.13.0 npm: N/A Yarn: N/A pnpm: 6.24.0-1 Relevant packages: next: 12.1.4 react: 17.0.2 react-dom: 17.0.2 What browser are you using? (if relevant) _No response_ How are you deploying your application? (if relevant) _No response_ Describe the Bug I had my development server running in the background without me remembering and I wanted to build my app using `next build`, that's what I've got: [code block] And I was stuck for 30 minutes on `info - Creating an optimized production build` without any indication of anything being wrong, I noticed that the development server was running, after I've shut it down and ran `next build` again It compiled successfully. Expected Behavior - Run `next build` to compile the app for production even when I'm running the development server. OR - Notify me that the development server is running and needs to be shut down before running `next build`, that's in case running `next build` when `next` is running isn't possible. Link to reproduction https://github.com/YassinEldeeb/Next.js-starter To Reproduce 1. Run `next` for the development server. 2. Then run `next build` while the development server is running. Note: It's not specific to the repository lin

Confidence85%
85%
Candidate Fix
1 fix
πŸ—„οΈ DatabasesVercel
Freshalmost 6 years ago

Engine Exited on GCR (Google Cloud Run)

Getting this error on Google Cloud Run, after redeploy it works again. Is there still some issue with serverless?

Confidence84%
84%
Candidate Fix
1 fixβœ“ 2 verified
πŸ—„οΈ DatabasesVercel
Freshalmost 5 years ago

Prisma CLI installation hangs indefinitely inside of docker (Kernel 5.10)

Bug description @prisma/cli installation hangs indefinitely inside of docker How to reproduce REPRO: https://github.com/svelters/prisma-poc Expected behavior It should install without container discrimination Prisma information `@prisma/cli` version: "2.15.0" Environment & setup - OS: Linux - Docker (alpine, debian etc...) - Database: doesn't matter - Node.js version: 15.6.0 but it seems to fail on any version we tried - Prisma version: doesn't matter as it fails because of the cli

Confidence84%
84%
Candidate Fix
1 fixβœ“ 2 verified