Repository navigation
Closed
Labels
🐹 platform/windowsPull request or issue on Windows🐛 bugSomething isn't working🐞 pri/criticalBugs which cause the Mark Text crash or unable to continue normal use
Description
The windows build fails in develop tag and also in v.0.17.0.
Build instructions of build workflow are used.
Steps to reproduce:
open admin powershell:
# Download and install Chocolatey:
powershell -c "irm https://community.chocolatey.org/install.ps1|iex"
# Download and install Node.js:
choco install nodejs --version="16.20.0"
# Verify the Node.js version:
node -v # Should print "v16.20.0".
# Verify npm version:
npm -v # Should print "8.19.4".
#otherwise do
npm install [email protected] -g
corepack enable yarn
open vs-development powershell (did not work on 2019,2022,2026):
git clone https://github.com/marktext/marktext.git
npm install --global node-gyp@latest
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
node-gyp install
yarn install --check-files --frozen-lockfile
error message happens with gyp (yarn run rebuild) of ced
yarn run v1.22.22
$ electron-rebuild -f
\ Building module: ced, Completed: 0Traceback (most recent call last):
File "C:\Users\k\git\marktext2\node_modules\node-gyp\gyp\gyp_main.py", line 42, in <module>
import gyp # noqa: E402
^^^^^^^^^^
File "C:\Users\k\git\marktext2\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 9, in <module>
import gyp.input
File "C:\Users\k\git\marktext2\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in <module>
from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\k\git\marktext2\node_modules\ced'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `gyp` failed with exit code: 1
Error: node-gyp failed to rebuild 'C:\Users\k\git\marktext2\node_modules\ced'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `gyp` failed with exit code: 1
at NodeGyp.rebuildModule (C:\Users\k\git\marktext2\node_modules\electron-rebuild\lib\src\module-type\node-gyp.js:117:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ModuleRebuilder.rebuildNodeGypModule (C:\Users\k\git\marktext2\node_modules\electron-rebuild\lib\src\module-rebuilder.js:94:9)
at async ModuleRebuilder.rebuild (C:\Users\k\git\marktext2\node_modules\electron-rebuild\lib\src\module-rebuilder.js:124:14)
at async Rebuilder.rebuildModuleAt (C:\Users\k\git\marktext2\node_modules\electron-rebuild\lib\src\rebuild.js:145:13)
at async Rebuilder.rebuild (C:\Users\k\git\marktext2\node_modules\electron-rebuild\lib\src\rebuild.js:108:17)
at async C:\Users\k\git\marktext2\node_modules\electron-rebuild\lib\src\cli.js:154:9
error Command failed with exit code 4294967295.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 4294967295.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Metadata
Metadata
Assignees
Labels
🐹 platform/windowsPull request or issue on Windows🐛 bugSomething isn't working🐞 pri/criticalBugs which cause the Mark Text crash or unable to continue normal use
Activity
kiliansinger commentedon Mar 19, 2026
python -m pip install setuptools
fixes it.
Proposing update of build instructions
kiliansinger commentedon Mar 19, 2026
I just did a PR (#4150) to fix this and also fix pasting html with images to properly save images.
Jocs commentedon May 18, 2026
The build steps in this report use Node.js 16 and Yarn, both of which are no longer supported by MarkText. The project now requires Node.js >=20.19.0 and uses pnpm as the package manager ([email protected]).
The distutils error you encountered is a known Python 3.12+ issue where distutils was removed from the standard library. This is moot with the current toolchain since the rebuild step now uses pnpm and the native-module build has been updated accordingly (#4211, #4230).
Please follow the updated build instructions in the README using pnpm and Node.js 20+.