Every time that I execute npm install voxel-worldgen, the installation fails with the following log:
npm ERR! code 1
npm ERR! path C:\Users\victo\node_modules\voxel-worldgen
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c neon build
npm ERR! neon info forcing rebuild for new build settings
npm ERR! neon info running cargo
npm ERR! Updating crates.io index
npm ERR! Compiling autocfg v1.1.0
npm ERR! Compiling winapi v0.3.9
npm ERR! Compiling memchr v2.5.0
npm ERR! Compiling rustc-serialize v0.3.24
npm ERR! Compiling lazy_static v1.4.0
npm ERR! Compiling regex v0.2.11
npm ERR! Compiling ucd-util v0.1.10
npm ERR! Compiling regex-syntax v0.5.6
npm ERR! Compiling num-traits v0.2.16
npm ERR! Compiling num-integer v0.1.45
npm ERR! Compiling num-iter v0.1.43
npm ERR! Compiling thread_local v0.3.6
npm ERR! Compiling rand v0.4.6
npm ERR! Compiling aho-corasick v0.6.10
npm ERR! Compiling libc v0.2.147
npm ERR! Compiling utf8-ranges v1.0.5
npm ERR! Compiling num-bigint v0.4.3
npm ERR! Compiling cfg-if v1.0.0
npm ERR! Compiling gcc v0.3.55
npm ERR! Compiling getrandom v0.2.10
npm ERR! Compiling num-bigint v0.1.44
npm ERR! Compiling num-complex v0.1.43
npm ERR! Compiling num-rational v0.4.1
npm ERR! Compiling rand v0.3.23
npm ERR! Compiling rand_core v0.6.4
npm ERR! Compiling neon-build v0.1.23
npm ERR! Compiling num-rational v0.1.42
npm ERR! Compiling ppv-lite86 v0.2.17
npm ERR! Compiling num v0.1.42
npm ERR! Compiling neon v0.1.23
npm ERR! Compiling rand_chacha v0.3.1
npm ERR! Compiling num-complex v0.4.3
npm ERR! Compiling semver-parser v0.7.0
npm ERR! Compiling neon-runtime v0.1.23
npm ERR! Compiling cslice v0.2.0
npm ERR! Compiling num v0.4.1
npm ERR! Compiling semver v0.9.0
npm ERR! Compiling rand v0.8.5
npm ERR! Compiling noise v0.2.0
npm ERR! Compiling nalgebra v0.5.1
npm ERR! Compiling noise v0.1.5
npm ERR! error[E0432]: unresolved imports rand::Rand, rand::XorShiftRng
npm ERR! --> C:\Users\victo.cargo\registry\src\index.crates.io-6f17d22bba15001f\noise-0.1.5\src\seed.rs:18:12
npm ERR! |
npm ERR! 18 | use rand::{Rand, Rng, SeedableRng, XorShiftRng};
npm ERR! | ^^^^ ^^^^^^^^^^^ no XorShiftRng in the root
npm ERR! | |
npm ERR! | no Rand in the root
npm ERR!
npm ERR! For more information about this error, try rustc --explain E0432.
npm ERR! error: could not compile noise (lib) due to previous error
npm ERR! warning: build failed, waiting for other jobs to finish...
npm ERR! error: failed to run custom build command for neon-runtime v0.1.23
npm ERR!
npm ERR! Caused by:
npm ERR! process didn't exit successfully: C:\Users\victo\node_modules\voxel-worldgen\native\target\release\build\neon-runtime-ab39f5dbd12c79e3\build-script-build (exit code: 101)
npm ERR! --- stdout
npm ERR! 'Skipping node-gyp installation as part of npm install.'
npm ERR! cargo:node_arch=x64
npm ERR!
npm ERR! --- stderr
npm ERR! thread 'main' panicked at 'Couldn't find node_root_dir in node-gyp output.', C:\Users\victo.cargo\registry\src\index.crates.io-6f17d22bba15001f\neon-runtime-0.1.23\build.rs:47:10
npm ERR! note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
npm ERR! neon ERR! cargo build failed
npm ERR!
npm ERR! Error: cargo build failed
npm ERR! at Target. (C:\Users\victo\node_modules\neon-cli\lib\target.js:124:35)
npm ERR! at step (C:\Users\victo\node_modules\neon-cli\lib\target.js:32:23)
npm ERR! at Object.next (C:\Users\victo\node_modules\neon-cli\lib\target.js:13:53)
npm ERR! at fulfilled (C:\Users\victo\node_modules\neon-cli\lib\target.js:4:58)
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:95:5)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\victo\AppData\Local\npm-cache_logs\2023-07-28T20_22_23_076Z-debug-0.log
My rustc version is 1.71.0
The root of the problem is here:
npm ERR! error[E0432]: unresolved imports rand::Rand, rand::XorShiftRng
npm ERR! --> C:\Users\victo.cargo\registry\src\index.crates.io-6f17d22bba15001f\noise-0.1.5\src\seed.rs:18:12
npm ERR! |
npm ERR! 18 | use rand::{Rand, Rng, SeedableRng, XorShiftRng};
npm ERR! | ^^^^ ^^^^^^^^^^^ no XorShiftRng in the root
npm ERR! | |
npm ERR! | no Rand in the root
It seems that the Rust compilation error has something to do with the problem.
Hello. I opened this issue in another repository (https://github.com/mhsjlw/native-voxel-generator/issues/12), but I repost it here because the native-voxel-generator repository is unactive.
Every time that I execute
npm install voxel-worldgen
, the installation fails with the following log: npm ERR! code 1 npm ERR! path C:\Users\victo\node_modules\voxel-worldgen npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c neon build npm ERR! neon info forcing rebuild for new build settings npm ERR! neon info running cargo npm ERR! Updating crates.io index npm ERR! Compiling autocfg v1.1.0 npm ERR! Compiling winapi v0.3.9 npm ERR! Compiling memchr v2.5.0 npm ERR! Compiling rustc-serialize v0.3.24 npm ERR! Compiling lazy_static v1.4.0 npm ERR! Compiling regex v0.2.11 npm ERR! Compiling ucd-util v0.1.10 npm ERR! Compiling regex-syntax v0.5.6 npm ERR! Compiling num-traits v0.2.16 npm ERR! Compiling num-integer v0.1.45 npm ERR! Compiling num-iter v0.1.43 npm ERR! Compiling thread_local v0.3.6 npm ERR! Compiling rand v0.4.6 npm ERR! Compiling aho-corasick v0.6.10 npm ERR! Compiling libc v0.2.147 npm ERR! Compiling utf8-ranges v1.0.5 npm ERR! Compiling num-bigint v0.4.3 npm ERR! Compiling cfg-if v1.0.0 npm ERR! Compiling gcc v0.3.55 npm ERR! Compiling getrandom v0.2.10 npm ERR! Compiling num-bigint v0.1.44 npm ERR! Compiling num-complex v0.1.43 npm ERR! Compiling num-rational v0.4.1 npm ERR! Compiling rand v0.3.23 npm ERR! Compiling rand_core v0.6.4 npm ERR! Compiling neon-build v0.1.23 npm ERR! Compiling num-rational v0.1.42 npm ERR! Compiling ppv-lite86 v0.2.17 npm ERR! Compiling num v0.1.42 npm ERR! Compiling neon v0.1.23 npm ERR! Compiling rand_chacha v0.3.1 npm ERR! Compiling num-complex v0.4.3 npm ERR! Compiling semver-parser v0.7.0 npm ERR! Compiling neon-runtime v0.1.23 npm ERR! Compiling cslice v0.2.0 npm ERR! Compiling num v0.4.1 npm ERR! Compiling semver v0.9.0 npm ERR! Compiling rand v0.8.5 npm ERR! Compiling noise v0.2.0 npm ERR! Compiling nalgebra v0.5.1 npm ERR! Compiling noise v0.1.5 npm ERR! error[E0432]: unresolved imports rand::Rand, rand::XorShiftRng npm ERR! --> C:\Users\victo.cargo\registry\src\index.crates.io-6f17d22bba15001f\noise-0.1.5\src\seed.rs:18:12 npm ERR! | npm ERR! 18 | use rand::{Rand, Rng, SeedableRng, XorShiftRng}; npm ERR! | ^^^^ ^^^^^^^^^^^ no XorShiftRng in the root npm ERR! | | npm ERR! | no Rand in the root npm ERR! npm ERR! For more information about this error, try rustc --explain E0432. npm ERR! error: could not compile noise (lib) due to previous error npm ERR! warning: build failed, waiting for other jobs to finish... npm ERR! error: failed to run custom build command for neon-runtime v0.1.23 npm ERR! npm ERR! Caused by: npm ERR! process didn't exit successfully: C:\Users\victo\node_modules\voxel-worldgen\native\target\release\build\neon-runtime-ab39f5dbd12c79e3\build-script-build (exit code: 101) npm ERR! --- stdout npm ERR! 'Skipping node-gyp installation as part of npm install.' npm ERR! cargo:node_arch=x64 npm ERR! npm ERR! --- stderr npm ERR! thread 'main' panicked at 'Couldn't find node_root_dir in node-gyp output.', C:\Users\victo.cargo\registry\src\index.crates.io-6f17d22bba15001f\neon-runtime-0.1.23\build.rs:47:10 npm ERR! note: run with RUST_BACKTRACE=1 environment variable to display a backtrace npm ERR! neon ERR! cargo build failed npm ERR! npm ERR! Error: cargo build failed npm ERR! at Target. (C:\Users\victo\node_modules\neon-cli\lib\target.js:124:35) npm ERR! at step (C:\Users\victo\node_modules\neon-cli\lib\target.js:32:23) npm ERR! at Object.next (C:\Users\victo\node_modules\neon-cli\lib\target.js:13:53) npm ERR! at fulfilled (C:\Users\victo\node_modules\neon-cli\lib\target.js:4:58) npm ERR! at processTicksAndRejections (internal/process/task_queues.js:95:5)npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\victo\AppData\Local\npm-cache_logs\2023-07-28T20_22_23_076Z-debug-0.log
My rustc version is 1.71.0 The root of the problem is here: npm ERR! error[E0432]: unresolved imports rand::Rand, rand::XorShiftRng npm ERR! --> C:\Users\victo.cargo\registry\src\index.crates.io-6f17d22bba15001f\noise-0.1.5\src\seed.rs:18:12 npm ERR! | npm ERR! 18 | use rand::{Rand, Rng, SeedableRng, XorShiftRng}; npm ERR! | ^^^^ ^^^^^^^^^^^ no XorShiftRng in the root npm ERR! | | npm ERR! | no Rand in the root
It seems that the Rust compilation error has something to do with the problem.