docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

Build failed with Error: Cannot find module './prism-js'

Open kevingrondin opened this issue 4 years ago • 1 comments

Have you read the Contributing Guidelines on issues?

Prerequisites

  • [X] I'm using the latest version of Docusaurus.
  • [X] I have tried the npm run clear or yarn clear command.
  • [X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • [X] I have tried creating a repro with https://new.docusaurus.io.
  • [X] I have read the console error message carefully (if applicable).

Description

When I build a project i've got this message

Error: Cannot find module './prism-js' at Array.forEach () [ERROR] Unable to build website for locale en. [ERROR] Error: Failed to compile with errors.

Reproducible demo

No response

Steps to reproduce

  1. yarn build

Expected behavior

Error: Cannot find module './prism-js' at Array.forEach () [ERROR] Unable to build website for locale en. [ERROR] Error: Failed to compile with errors.

Actual behavior

Error: Cannot find module './prism-js' at Array.forEach () [ERROR] Unable to build website for locale en. [ERROR] Error: Failed to compile with errors.

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

  • [ ] I'd be willing to fix this bug myself.

kevingrondin avatar Apr 16 '22 13:04 kevingrondin

Sorry, @kevingrondin I cannot help you if you don't provide a repro. Does this happen on a new site? Do you need to do something specific to trigger it? Do you have a repo where I can see this bug live?

We have stated multiple times in the issue template that make sure the bug is actually a bug. It seems you haven't really put effort into that demonstration, neither have you helped us help you by at least providing a repro. I'll be closing this until you can provide more information.

Josh-Cena avatar Apr 16 '22 13:04 Josh-Cena