Netlify site name: tom-callahan-blog.netlify.app
I have a NextJS site that I’ve hosted on Netlify for a while (since Next 9 – now on 12.3).
Now I’m trying to use netlify-dev for the first time so that I can try out serverless functions (not edge functions, just regular serverless). I have one Hello World function set up using the sample code in the Netlify docs, called “steam”.
However when I try to run “netlify dev”, it starts the NextJS app, and the Netlify Dev server, I see it setting up all of the environment variables and everything, but as soon as I try to visit the dev site, Deno panics with an error related to the “next-dev” edge function.
The complete terminal output is below. It says it’s because the “next-dev” edge function is trying to run code generated from a string? I assume this next-dev edge function is automatically enabled just because I’m using NextJS on Netlify – I’m not otherwise using any edge functions.
I don’t have any NextJS-related plugins installed anymore (I used to but it looks like that’s all automatic now). I do have one custom plugin to update Algolia, and the Sentry integration, but those are build plugins, I can’t see how they would affect this.
I’ve tried reinstalling netlify CLI, installing it globally, installing it locally, running it with yarn and directly. I tried running it with framework=“#custom” in the Netlify TOML and specifying the command, port, etc… All with no change.
I am running Windows 11 – I haven’t yet tried it on Linux or Mac but could (although I would prefer to not have to do that long-term). This doesn’t seem like a platform issue though if the error is accurate.
yarn run v1.22.11
$ yarn netlify dev
$ "C:\Users\tom\Documents\Design Projects\TCBLOG\frontend\node_modules\.bin\netlify" dev
◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Ignored site settings env var: ALGOLIA_ADMIN_API_KEY (defined in .env.local file)
◈ Injected .env.local file env var: ALGOLIA_ADMIN_API_KEY
◈ Injected site settings env var: NETLIFY_NEXT_PLUGIN_SKIP
◈ Ignored site settings env var: NEXT_PUBLIC_ALGOLIA_APP_ID (defined in .env.local file)
◈ Injected .env.local file env var: NEXT_PUBLIC_ALGOLIA_APP_ID
◈ Ignored site settings env var: NEXT_PUBLIC_ALGOLIA_INDEX (defined in .env.local file)
◈ Injected .env.local file env var: NEXT_PUBLIC_ALGOLIA_INDEX
◈ Ignored site settings env var: NEXT_PUBLIC_ALGOLIA_SEARCH_ONLY_API_KEY (defined in .env.local file)
◈ Injected .env.local file env var: NEXT_PUBLIC_ALGOLIA_SEARCH_ONLY_API_KEY
◈ Ignored site settings env var: NEXT_PUBLIC_SNIPCART_API_KEY (defined in .env.local file)
◈ Injected .env.local file env var: NEXT_PUBLIC_SNIPCART_API_KEY
◈ Injected site settings env var: NODE_VERSION
◈ Ignored site settings env var: SANITY_DATASET (defined in .env.local file)
◈ Injected .env.local file env var: SANITY_DATASET
◈ Ignored site settings env var: SANITY_PROJECT_ID (defined in .env.local file)
◈ Injected .env.local file env var: SANITY_PROJECT_ID
◈ Injected site settings env var: SENTRY_AUTH_TOKEN
◈ Injected site settings env var: SENTRY_ORG
◈ Injected site settings env var: SENTRY_PROJECT
◈ Loaded function steam http://localhost:8888/.netlify/functions/steam.
◈ Functions server is listening on 60450
◈ Setting up local development server
────────────────────────────────────────────────────────────────
Netlify Build
────────────────────────────────────────────────────────────────
❯ Version
@netlify/build 28.1.7
❯ Flags
{}
❯ Current directory
C:\Users\tom\Documents\Design Projects\TCBLOG\frontend
❯ Config file
C:\Users\tom\Documents\Design Projects\TCBLOG\frontend\netlify.toml
❯ Context
dev
❯ Using Next.js Runtime - v4.28.4
❯ Loading plugins
- @sentry/netlify-build-plugin@1.1.1 from Netlify app
- /plugins/netlify-plugin-update-algolia@1.2.1 from netlify.toml
────────────────────────────────────────────────────────────────
1. @netlify/plugin-nextjs (onPreDev event)
────────────────────────────────────────────────────────────────
Patching C:\Users\tom\Documents\Design Projects\TCBLOG\frontend\node_modules\next\dist\server\base-server.js
Done
Patching C:\Users\tom\Documents\Design Projects\TCBLOG\frontend\node_modules\next\dist\server\next-server.js
Done
(@netlify/plugin-nextjs onPreDev completed in 104ms)
────────────────────────────────────────────────────────────────
2. Run command for local development
────────────────────────────────────────────────────────────────
◈ Starting Netlify Dev with Next.js
$ nextready - started server on 0.0.0.0:3000, url: http://localhost:3000info - Loaded env from C:\Users\tom\Documents\Design Projects\TCBLOG\frontend\.env.local
✔ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml
(dev.command completed in 1s)
┌─────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:8888 │
│ │
└─────────────────────────────────────────────────┘
◈ Loaded edge function next-dev
event - compiled client and server successfully in 1729 ms (349 modules)
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: windows x86_64
Version: 1.27.1
Args: ["C:\\Users\\tom\\AppData\\Roaming\\netlify\\Config\\deno-cli\\deno.exe", "run", "--allow-all", "--unstable", "--import-map=data:application/json;base64,eyJpbXBvcnRzIjp7Im5ldGxpZnk6ZWRnZSI6Imh0dHBzOi8vZWRnZS5uZXRsaWZ5LmNvbS92MS9pbmRleC50cyJ9fQ==", "--v8-flags=--disallow-code-generation-from-strings", "--no-config", "--quiet", "C:\\Users\\tom\\AppData\\Local\\Temp\\tmp-21696-kh4ClulIHy9O\\dev.js", "--port", "60482"]
thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context
at new Function (<anonymous>)
at genAsyncOp (deno:core/01_core.js:169:14)
at Object.initializeAsyncOps (deno:core/01_core.js:213:19)
at Object.bootstrapMainRuntime [as mainRuntime] (deno:runtime/js/99_main.js:695:10)
at [deno:runtime\worker.rs:292:24]:1:11', runtime\worker.rs:293:8
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Terminate batch job (Y/N)? ^C
* The terminal process "C:\WINDOWS\System32\cmd.exe /d /c yarn run netlify-local" terminated with exit code: 1.