All my nextJS projects are failed due to Plugin "@netlify/plugin-nextjs" internal error: TypeError: isDynamicRoute is not a function

anyone else has the same issue? I didn’t change the code and the builds are failed since yesterday.

10:25:22 PM: ────────────────────────────────────────────────────────────────
10:25:22 PM: Plugin “@netlify/plugin-nextjs” internal error
10:25:22 PM: ────────────────────────────────────────────────────────────────
10:25:22 PM: ​
10:25:22 PM: Error message
10:25:22 PM: TypeError: isDynamicRoute is not a function
10:25:22 PM: ​
10:25:22 PM: Plugin details
10:25:22 PM: Package: @netlify/plugin-nextjs
10:25:22 PM: Version: 1.1.3
10:25:22 PM: Repository: git+https://github.com/netlify/netlify-plugin-nextjs.git
10:25:22 PM: npm link: @netlify/plugin-nextjs - npm
10:25:22 PM: Report issues: Issues · netlify/netlify-plugin-nextjs · GitHub
10:25:22 PM: ​
10:25:22 PM: Error location
10:25:22 PM: In “onBuild” event in “@netlify/plugin-nextjs” from Netlify app
10:25:22 PM: at /opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/lib/pages/withoutProps/redirects.js:26:8
10:25:22 PM: at Array.forEach ()
10:25:22 PM: at Object. (/opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/lib/pages/withoutProps/redirects.js:20:7)
10:25:22 PM: at Module._compile (internal/modules/cjs/loader.js:1133:30)
10:25:22 PM: at Object.Module._extensions…js (internal/modules/cjs/loader.js:1153:10)
10:25:22 PM: at Module.load (internal/modules/cjs/loader.js:977:32)
10:25:22 PM: at Function.Module._load (internal/modules/cjs/loader.js:877:14)
10:25:22 PM: at Module.require (internal/modules/cjs/loader.js:1019:19)
10:25:22 PM: at require (internal/modules/cjs/helpers.js:77:18)
10:25:22 PM: at setupRedirects (/opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/lib/steps/setupRedirects.js:34:8)

@rico_chen hello! we’re trying to backport a fix to this plugin version (1.x.x) which is default used for next 10.0.6 and lower. until then, you can try to upgrade next which will use the latest version of our plugin! also for faster response on plugin stuff in the future, you can open an issue on github!

1 Like

Hi Lindsay, is there a timeframe for when this is going to be fixed? Or a ticket I could follow?

I had the same issue and updating Next to 10.2 has lead me to medley of different issues, including my contact form breaking and custom 404s not working (my site is using a hybrid of SSG/SSR).

I need to spend more time to debug and get these working but wondering if the fix you mentioned might come first?

Thank you

@borton @rico_chen i just released this fix. it should automatically work for you. your build logs should show the plugin installed at v1.1.4. let me know!!

just discovered a bug via bugsnag with this version unrelated to the work i did. hang tight :frowning:

definitely let me know if you’re experiencing the issue yourself!

My build with @netlify/plugin-nextjs@1.1.3 did work before. Now it fails with the above mentioned isDynamicRoute error.

Using 1.1.4, I’m getting another error:

1:55:58 PM: ────────────────────────────────────────────────────────────────
1:55:58 PM: Plugin “@netlify/plugin-nextjs” internal error
1:55:58 PM: ────────────────────────────────────────────────────────────────
1:55:58 PM: ​
1:55:58 PM: Error message
1:55:58 PM: Error: Cannot find module ‘execa’
1:55:58 PM: Require stack:
1:55:58 PM: - /opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/index.js
1:55:58 PM: - /opt/build/repo/.netlify/plugins/node_modules/@netlify/plugin-nextjs/index.js
1:55:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/logic.js
1:55:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/load.js
1:55:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js
1:55:58 PM: ​
1:55:58 PM: Plugin details
1:55:58 PM: Package: @netlify/plugin-nextjs
1:55:58 PM: Version: 1.1.4
1:55:58 PM: Repository: git+https://github.com/netlify/netlify-plugin-nextjs.git
1:55:58 PM: npm link: @netlify/plugin-nextjs - npm
1:55:58 PM: Report issues: Issues · netlify/netlify-plugin-nextjs · GitHub
1:55:58 PM: ​
1:55:58 PM: Error location
1:55:58 PM: In “onBuild” event in “@netlify/plugin-nextjs” from Netlify app
1:55:58 PM: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
1:55:58 PM: at Function.Module._load (internal/modules/cjs/loader.js:840:27)
1:55:58 PM: at Module.require (internal/modules/cjs/loader.js:1019:19)
1:55:58 PM: at require (internal/modules/cjs/helpers.js:77:18)
1:55:58 PM: at Object. (/opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/index.js:4:15)
1:55:58 PM: at Module._compile (internal/modules/cjs/loader.js:1133:30)
1:55:58 PM: at Object.Module._extensions…js (internal/modules/cjs/loader.js:1153:10)
1:55:58 PM: at Module.load (internal/modules/cjs/loader.js:977:32)
1:55:58 PM: at Function.Module._load (internal/modules/cjs/loader.js:877:14)
1:55:58 PM: at Module.require (internal/modules/cjs/loader.js:1019:19)
1:55:58 PM: ​
1:55:58 PM: Error properties
1:55:58 PM: { code: ‘MODULE_NOT_FOUND’ }

@MarvinZeising hey marvin and all - yes we’ll be fixing this asap today!

this should be fixed now in v1.1.5! if not ill cry (joking, mostly)

2 Likes