Can be successfully built in Windows, but not in Linux.
I’m using docusaurus 2.3.1
Environment in Windows:
Windows 10
node v16.17.0
npm 9.3.0
yarn 1.22.19
Environment in Linux:
Centos 7.9.2009
node v16.18.0
npm 9.4.1
yarn 1.22.19
Code of the component with the problem:
https://github.com/Jerry12228/jerry-docs/tree/master/src/components/Artplayer
This component is included here:
https://github.com/Jerry12228/jerry-docs/blob/master/docs/Jerry-MC-Server/device_instruction/auto-furnace.mdx?plain=1
This is the output built in Windows:
yarn run v1.22.19
$ docusaurus build
[INFO] [zh-Hans] Creating an optimized production build...
✔ Client
✔ Server
Compiled successfully in 33.45s
ArtPlayer 4.6.2 https://artplayer.org
✔ Client
● Server █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
stored
Overwriting existing registered function: lunr-multi-trimmer-en-zh
Overwriting existing registered function: lunr-multi-trimmer-en-zh
[SUCCESS] Generated static files in "build".
[INFO] Use `npm
This is the output built in Centos 7.9
yarn run v1.22.19
$ docusaurus build
[INFO] [zh-Hans] Creating an optimized production build...
✖ Client
Compiled with some errors in 31.84s
● Server █████████████████████████ building (64%) 1/1 entries 2100/2100 dependencies 713/713 modules
0 active
Module not found: Error: Can't resolve '@site/src/components/ArtPlayer' in '/data/jenkins_home/workspace/Jerry-Docs/docs/Jerry-MC-Server/device_instruction'
[ERROR] Client bundle compiled with errors therefore further build is impossible.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.