2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

turborepoでRemixとDocusaurusを管理する場合に発生したエラー

Last updated at Posted at 2023-04-05

Remixプロジェクトが、apps/*に存在する状態で、Docusaurusプロジェクトをapps/*に作成しました。

その際に、npm run startを実行したところ、Compiles with problems:というエラーが発生しました。

Compiled with problems:
×
ERROR
pathname.match is not a function
TypeError: pathname.match is not a function

次に、npm run buildを実行したところ、次のように表示されました。

[ERROR] Docusaurus server-side rendering could not render static page with path /404.html.
...
TypeError: pathname.match is not a function
    at Array.some (<anonymous>)
    at Array.map (<anonymous>)
...
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.
...

1.png

2.png

この問題は、次の手順を実行することで解決しました。

  1. すべてのワークスペースのnode_modulesを削除する。
  2. ルートディレクトリのpackage-lock.jsonを削除する
  3. ルートディレクトリにて、npm installを実行する。

結果、npm run startnpm run buildの実行に成功しました。

3.png

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?