Netlify generated files (from running
netlify dev) causing type errors when running NextJS app.
Files might have something to do with
next-dev edge function. Is there a way to disable this?
Said files are:
- netlify-cli/node_modules/@netlify/edge-bundler/deno/config.ts:7:10 (globally installed package) - .netlify/edge-functions/edge-shared/utils.ts
Here is the complete error:
Found 2 errors. at async file:///home/kyljmn/.asdf/installs/nodejs/16.10.0/.npm/lib/node_modules/netlify-cli/node_modules/@netlify/edge-bundler/deno/config.ts:7:10 Could not load edge function at '/home/kyljmn/Documents/work/metrobank-next/.netlify/edge-functions/next-dev/index.js' TypeError: TS2345 [ERROR]: Argument of type 'URL' is not assignable to parameter of type 'string'. return Response.redirect(url, 308) ~~~ at file:///home/kyljmn/Documents/work/metrobank-next/.netlify/edge-functions/edge-shared/utils.ts:266:30 TS2345 [ERROR]: Argument of type 'URL' is not assignable to parameter of type 'string'. return Response.redirect(url, 308) ~~~ at file:///home/kyljmn/Documents/work/metrobank-next/.netlify/edge-functions/edge-shared/utils.ts:271:30
12.10.0, however, I’ve downgraded to some previous versions (
10.x.x) finally got it to work at
6.9.28 but the netlify function I need (different from the said edge function causing the error) doesn’t work as expected in that version.