docs: add Node.js/npm as prerequisite in getting-started guide#758
Closed
vasujain00 wants to merge 1 commit into
Closed
docs: add Node.js/npm as prerequisite in getting-started guide#758vasujain00 wants to merge 1 commit into
vasujain00 wants to merge 1 commit into
Conversation
Fixes IABTechLab#747 The trusted-server-js crate requires npm to run `npm ci` and `npm run build` during cargo build. The package-lock.json uses lockfileVersion 3, which requires npm >= 7. Node.js >= 18 is the minimum LTS version that ships with npm 7+. Without Node.js/npm installed, the build fails with a confusing error from the build.rs script in crates/js.
Collaborator
|
Thank you @vasujain00! We had actually opened similar issue (not pr) last week #747 |
2 tasks
Collaborator
|
@vasujain00 Thank you for submitting the PR. We opened new PR so that versions now stay in sync with .tool-versions automatically - no future doc edits needed when toolchain versions bump. See #760 |
aram356
added a commit
that referenced
this pull request
Jun 8, 2026
* Use .tool-versions variables in getting-started prerequisites
Replace hardcoded versions in the Getting Started prerequisites with
{{RUST_VERSION}}, {{NODEJS_VERSION}}, and {{FASTLY_VERSION}} placeholders,
which the VitePress config substitutes from .tool-versions at build time.
Adds NodeJS as an explicit prerequisite so contributors install Node/npm
before the JS build runs.
Supersedes #758. Fixes #747.
Author
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #747
The trusted-server-js crate requires npm to run
npm ciandnpm run buildduring cargo build. The package-lock.json uses lockfileVersion 3, which requires npm >= 7. Node.js >= 18 is the minimum LTS version that ships with npm 7+.Without Node.js/npm installed, the build fails with a confusing error from the build.rs script in crates/js.
Summary
build.rspanic when npm is missingChanges
docs/guide/getting-started.mdCloses
Closes #747
Test plan
cargo test --workspacecargo clippy --workspace --all-targets --all-features -- -D warningscargo fmt --all -- --checkcd crates/js/lib && npx vitest runcd crates/js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute servebuild.rs:81without npm, succeeds with npm (1,250 Rust tests + 318 JS tests pass)Checklist
unwrap()in production code -- useexpect("should ...")tracingmacros (notprintln!)