Closed vittorioromeo closed 3 months ago
Note: had to change cp.spawn("tsc", opts)
to cp.spawn("tsc.cmd", opts)
in rust-book\js-extensions\node_modules\@nota-lang\esbuild-utils\dist
to make it work on Windows.
Even after installing mdbook-quiz
with cargo, I get this error on mdbook build
:
Node.js v18.12.1
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module 'spellchecker'
Require stack:
- C:\Users\vromeo5\AppData\Local\Temp\.tmpsJ2VW5.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\vromeo5\AppData\Local\Temp\.tmpsJ2VW5.cjs:44:12656)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\Users\\vromeo5\\AppData\\Local\\Temp\\.tmpsJ2VW5.cjs' ]
}
Hi yes, the build is a little underdocumented at this point since we're rapidly changing features. You need to npm install -g spellechecker
to get the spellchecker. In general, the CI action is the only source of truth right now.
Just tried running the instructions with the cargo make
flavor, and it also fails:
$ cargo make install
[cargo-make] INFO - cargo make 0.37.7
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: rust-book
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: install
[cargo-make] INFO - Profile: development
[cargo-make] ERROR - Task install not found
[cargo-make] WARN - Build Failed.
When you say "the CI action", do you mean the GitHub Action workflow? Afer running the command above, mdbook
still isn't found, so I guess I need to manually install the binaries?
Ah sorry it should be cargo make build
(I will fix this in the README).
Running
mdbook build
is not enough, as I get this error message:I tried running
npm install
intojs-extensions
, and also downloadedpnpm
and tried running that, but I get this error withpnpm build
:What is the correct way of building this book?