From af238d4d93d401d508709626efb7d2839a9dabea Mon Sep 17 00:00:00 2001 From: Colin Ozanne Date: Wed, 11 Dec 2024 15:59:18 +0000 Subject: [PATCH 1/3] fix: add `unsafe-proto` flag to run Next.js app --- examples/tutorials/next.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/tutorials/next.md b/examples/tutorials/next.md index 0bd0d807..b7576fa4 100644 --- a/examples/tutorials/next.md +++ b/examples/tutorials/next.md @@ -41,6 +41,15 @@ to install the dependencies deno install ``` +Next.js has some dependencies that still rely on `Object.prototype.__proto__`, so you need to allow it first. +In a new `deno.json` file, add the following lines: + +```json deno.json +{ + "unstable": ["unsafe-proto"] +} +``` + Now you can serve your new Next.js app: ```sh From 03b8944f2e5c50ca456aa1daecafcac725625eca Mon Sep 17 00:00:00 2001 From: finxol Date: Wed, 11 Dec 2024 17:08:07 +0100 Subject: [PATCH 2/3] fix: linting error --- examples/tutorials/next.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/next.md b/examples/tutorials/next.md index b7576fa4..a3079451 100644 --- a/examples/tutorials/next.md +++ b/examples/tutorials/next.md @@ -41,8 +41,9 @@ to install the dependencies deno install ``` -Next.js has some dependencies that still rely on `Object.prototype.__proto__`, so you need to allow it first. -In a new `deno.json` file, add the following lines: +Next.js has some dependencies that still rely on `Object.prototype.__proto__`, +so you need to allow it. In a new `deno.json` file, add the following +lines: ```json deno.json { From 8411c370d9c319147ba397ceafe0f7a842ab88d0 Mon Sep 17 00:00:00 2001 From: finxol Date: Wed, 11 Dec 2024 17:09:17 +0100 Subject: [PATCH 3/3] fix: linting error --- examples/tutorials/next.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/tutorials/next.md b/examples/tutorials/next.md index a3079451..1cf9f9ed 100644 --- a/examples/tutorials/next.md +++ b/examples/tutorials/next.md @@ -42,8 +42,7 @@ deno install ``` Next.js has some dependencies that still rely on `Object.prototype.__proto__`, -so you need to allow it. In a new `deno.json` file, add the following -lines: +so you need to allow it. In a new `deno.json` file, add the following lines: ```json deno.json {