0

Module build failed: UnhandledSchemeError: Reading from "node:assert" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs.

6
  • What version of node are you running? node -v Commented May 26, 2022 at 14:40
  • I'm using node v18.1.0 Commented May 26, 2022 at 18:19
  • 1
    Did you try updating Next.js? It seems this problem was related to versions 12.1.5 and previous. Commented May 26, 2022 at 20:38
  • not yet, I will do right now... Commented May 26, 2022 at 20:54
  • im using and getting the same error "next": "^11.1.4", Commented May 26, 2022 at 21:46

1 Answer 1

1

I had the same problem with next 12.3.1 and STRAPI VERSION v4.4.1. It was due to the strapi was running on node 16 and next was running on 18. Check your version of next and strapi installation by running

  • node -v (in terminal in the root folder of both next and strapi) if they are different run
  • nvm install v16(for the nextjs root)
  • nvm use 16 (on the nextjs root)

This solved my issue. (also remember to pass an absolute URL for the fetch)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.