Cannot compile components
ilnur-slv opened this issue · comments
I am trying to compile components using this documentation
https://docs.mathjax.org/en/latest/web/webpack.html
I do:
npm install
npm run compile
node .\components\bin\makeAll
I get a lot of errors:
Webpacking \src\a11y\assistive-mml
node:events:368
throw er; // Unhandled 'error' event
^
Error: spawn npx ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn npx',
path: 'npx',
spawnargs: [ 'webpack', '--json' ]
}
Command failed: node C:\Code\MathJax-src\components\bin\pack
node:events:368
I used different versions of node (10, 14, 16).
What am I doing wrong?
It looks like the call that is trying to run npx webpack
is failing with a file-not-found error. It may be that npx
isn't installed (it should be installed when you install npm
, but I see some reports that it isn't with Windows). If you perform
npx webpack --version
does that give you an error message abut npx
, or do you get the webpack version?
If you get an error, you may need to install that yourself via
npm install -g npx
See if that helps.
@ilnur-slv Can this be closed?
@ilnur-slv Can this be closed?
Yep, I will close.