# Runtime.ImportModuleError - Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'

**URL:** <https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105>\
**Category:** Support\
**Tags:** nextjs, deployment\
**Created:** [July 20, 2023, 4:57pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105 "2023-07-20T16:57:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jd\_engine](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jd_engine/32/53137_2.png) [@jd\_engine](https://answers.netlify.com/u/jd_engine)\
**Post date:** [July 20, 2023, 4:57pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/1 "2023-07-20T16:57:42Z")

</div>

Getting these really strange errors with Next 13.4.10. Previously these pages worked on 13.4.9 but they seem to be broken now. Wondering if there is anything I can do on my side for this:

```auto
Jul 20, 09:41:28 AM: b2b8b4c4 Duration: 257.64 ms Memory Usage: 21 MB 
Jul 20, 09:41:29 AM: 2023-07-20T16:41:29.480Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'\nRequire stack:\n- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js\n- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js\n- /var/task/.netlify/functions-internal/ ___netlify-odb-handler/___ netlify-odb-handler.js\n- /var/task/___netlify-odb-handler.js\n- /var/runtime/index.mjs","stack":["Runtime.ImportModuleError: Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'","Require stack:","- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js","- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js","- /var/task/.netlify/functions-internal/___netlify-odb-handler/ ___netlify-odb-handler.js","- /var/task/___ netlify-odb-handler.js","- /var/runtime/index.mjs"," at _loadUserApp (file:///var/runtime/index.mjs:997:17)"," at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1029:21)"," at async start (file:///var/runtime/index.mjs:1192:23)"," at async file:///var/runtime/index.mjs:1198:1"]}
Jul 20, 09:41:29 AM: Unknown application error occurred
Runtime.ImportModuleError
Jul 20, 09:41:29 AM: 3ac0293e Duration: 267.80 ms Memory Usage: 21 MB 
Jul 20, 09:41:29 AM: INIT_START Runtime Version: nodejs:18.v9 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:7d5f06b69c951da8a48b926ce280a9daf2e8bb1a74fc4a2672580c787d608206
Jul 20, 09:41:29 AM: 2023-07-20T16:41:29.744Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'\nRequire stack:\n- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js\n- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js\n- /var/task/.netlify/functions-internal/ ___netlify-odb-handler/___ netlify-odb-handler.js\n- /var/task/___netlify-odb-handler.js\n- /var/runtime/index.mjs","stack":["Runtime.ImportModuleError: Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'","Require stack:","- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js","- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js","- /var/task/.netlify/functions-internal/___netlify-odb-handler/ ___netlify-odb-handler.js","- /var/task/___ netlify-odb-handler.js","- /var/runtime/index.mjs"," at _loadUserApp (file:///var/runtime/index.mjs:997:17)"," at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1029:21)"," at async start (file:///var/runtime/index.mjs:1192:23)"," at async file:///var/runtime/index.mjs:1198:1"]}
Jul 20, 09:41:30 AM: 2023-07-20T16:41:30.059Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'\nRequire stack:\n- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js\n- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js\n- /var/task/.netlify/functions-internal/ ___netlify-odb-handler/___ netlify-odb-handler.js\n- /var/task/___netlify-odb-handler.js\n- /var/runtime/index.mjs","stack":["Runtime.ImportModuleError: Error: Cannot find module 'next/dist/compiled/react/jsx-dev-runtime'","Require stack:","- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js","- /var/task/node_modules/.pnpm/next@13.4.10_@babel+core@7.22.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js","- /var/task/.netlify/functions-internal/___netlify-odb-handler/ ___netlify-odb-handler.js","- /var/task/___ netlify-odb-handler.js","- /var/runtime/index.mjs"," at _loadUserApp (file:///var/runtime/index.mjs:997:17)"," at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1029:21)"," at async start (file:///var/runtime/index.mjs:1192:23)"," at async file:///var/runtime/index.mjs:1198:1"]}
Jul 20, 09:41:30 AM: Unknown application error occurred

```

---

<div class="post-metadata">

**Author:** ![Kapple14](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kapple14/32/52905_2.png) [@Kapple14](https://answers.netlify.com/u/Kapple14)\
**Post date:** [July 21, 2023, 9:05am UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/2 "2023-07-21T09:05:40Z")

</div>

Hey JD!

I experienced the same issue with Next.js version 13.4.11. This seems to be an internal Netlify issue. This error only appears on my sanity blog related sites🧐

---

<div class="post-metadata">

**Author:** ![jd\_engine](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jd_engine/32/53137_2.png) [@jd\_engine](https://answers.netlify.com/u/jd_engine)\
**Post date:** [July 21, 2023, 4:18pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/3 "2023-07-21T16:18:42Z")

</div>

Oh interesting. We are also using Sanity for this site. I have found that the support for the latest versions of Next on Netlify to be spotty…

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [July 23, 2023, 1:12pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/4 "2023-07-23T13:12:02Z")

</div>

@jd_engine,

Since you’re using `pnpm`, can you confirm, you’ve read this: [Next.js on Netlify | Netlify Docs](https://docs.netlify.com/integrations/frameworks/next-js/overview/#pnpm-support)?

@Kapple14, we need a site to check.

---

<div class="post-metadata">

**Author:** ![marnau](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@marnau](https://answers.netlify.com/u/marnau)\
**Post date:** [July 24, 2023, 2:50pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/5 "2023-07-24T14:50:30Z")

</div>

I’m facing the same problem. You can see it at: [https://joaquimsellasprova.netlify.app/en/studio](https://joaquimsellasprova.netlify.app/en/studio)

Also using Sanity.

---

<div class="post-metadata">

**Author:** ![jeffreyli](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jeffreyli/32/51401_2.png) [@jeffreyli](https://answers.netlify.com/u/jeffreyli)\
**Post date:** [July 28, 2023, 4:59pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/6 "2023-07-28T16:59:45Z")

</div>

Hey - running into the same issue. Using nextjs ^13.4.12, not using sanity. Any fix?

---

<div class="post-metadata">

**Author:** ![jd\_engine](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jd_engine/32/53137_2.png) [@jd\_engine](https://answers.netlify.com/u/jd_engine)\
**Post date:** [July 28, 2023, 6:37pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/7 "2023-07-28T18:37:57Z")

</div>

I fixed it for now by rolling back to **Next 13.4.9**

I have not tried later versions yet

---

<div class="post-metadata">

**Author:** ![jd\_engine](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jd_engine/32/53137_2.png) [@jd\_engine](https://answers.netlify.com/u/jd_engine)\
**Post date:** [July 28, 2023, 6:39pm UTC](https://answers.netlify.com/t/runtime-importmoduleerror-error-cannot-find-module-next-dist-compiled-react-jsx-dev-runtime/97105/8 "2023-07-28T18:39:23Z")

</div>

Yes. It worked before and stopped working after a bump in Next versions. I haven’t touched anything else. It also build fine locally and inside our pnpm docker image
