You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the stylus itself and required changes seam pretty straightforward, the real problem was for actually making cargo build --features=regenerate-css work without crashing.
suggested npm install in mdbook dir results in:
$ npm install
npm WARN enoent ENOENT: no such file or directory, open '/home/budziq/work/rust/mdBook/package.json'
npm WARN mdBook No description
npm WARN mdBook No repository field.
npm WARN mdBook No README data
npm WARN mdBook No license field.
cargo build --features=regenerate-css results in relatively cryptic
$ cargo build --features=regenerate-css
Compiling mdbook v0.0.22-pre (file:///home/budziq/work/rust/mdBook)
error: failed to run custom build command for `mdbook v0.0.22-pre (file:///home/budziq/work/rust/mdBook)`
process didn't exit successfully: `/home/budziq/work/rust/mdBook/target/debug/build/mdbook-fa6b8542367f4aa5/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', /checkout/src/libcore/result.rs:859
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Installing stylus by hand with npm install stylus -g graduates us to:
cargo build --features=regenerate-css
Compiling mdbook v0.0.22-pre (file:///home/budziq/work/rust/mdBook)
error: failed to run custom build command for `mdbook v0.0.22-pre (file:///home/budziq/work/rust/mdBook)`
process didn't exit successfully: `/home/budziq/work/rust/mdBook/target/debug/build/mdbook-fa6b8542367f4aa5/build-script-build` (exit code: 101)
--- stderr
module.js:472
throw err;
^
Error: Cannot find module 'nib'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at /usr/lib/node_modules/stylus/bin/stylus:795:10
at Array.forEach (native)
at usePlugins (/usr/lib/node_modules/stylus/bin/stylus:792:11)
at /usr/lib/node_modules/stylus/bin/stylus:653:9
at tryToString (fs.js:449:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436:12)
thread 'main' panicked at 'Stylus encoutered an error', build.rs:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.
And only installing nib did the trick for me npm install nib -g.
@azerupi I guess that some config file is missing (I am not sure as I have zero experience with node/npm but you have suggested contact if CONTRIBUTING.md is not clear in any way). While the CONTRIBUTING.md is written clearly imho it is not foolproof for someone without webdev experience.
The text was updated successfully, but these errors were encountered:
Oh right, this is my fault. 😞
I didn't go through the procedure again while writing the guide and I made a mistake.
You are right, stylus and nib need to be installed with (sudo) npm install -g stylus nib.
Hi, I was trying to correct https://github.com/azerupi/mdBook/pull/289
While the stylus itself and required changes seam pretty straightforward, the real problem was for actually making
cargo build --features=regenerate-css
work without crashing.suggested
npm install
in mdbook dir results in:cargo build --features=regenerate-css results in relatively cryptic
Installing
stylus
by hand withnpm install stylus -g
graduates us to:And only installing
nib
did the trick for menpm install nib -g
.@azerupi I guess that some config file is missing (I am not sure as I have zero experience with node/npm but you have suggested contact if CONTRIBUTING.md is not clear in any way). While the CONTRIBUTING.md is written clearly imho it is not foolproof for someone without webdev experience.
The text was updated successfully, but these errors were encountered: