### Example Error Log from npm Install Source: https://github.com/nodejs/node-gyp/blob/main/docs/Error-pre-versions-of-node-cannot-be-installed.md This log shows the typical error output when `npm install` fails due to a 'pre' version of Node.js. ```bash $ npm install bcrypt npm http GET https://registry.npmjs.org/bcrypt/0.7.5 npm http 304 https://registry.npmjs.org/bcrypt/0.7.5 npm http GET https://registry.npmjs.org/bindings/1.0.0 npm http 304 https://registry.npmjs.org/bindings/1.0.0 > bcrypt@0.7.5 install /home/ubuntu/public/song-swap/node_modules/bcrypt > node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:69:16) gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:56:37) gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:219:20) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:105:9 gyp ERR! stack at ChildProcess.exithandler (child_process.js:630:7) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17) gyp ERR! stack at maybeClose (child_process.js:730:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:5) gyp ERR! System Linux 3.5.0-21-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/ubuntu/public/song-swap/node_modules/bcrypt gyp ERR! node -v v0.11.2-pre gyp ERR! node-gyp -v v0.9.5 gyp ERR! not ok npm ERR! bcrypt@0.7.5 install: `node-gyp rebuild` npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 npm ERR! npm ERR! Failed at the bcrypt@0.7.5 install script. npm ERR! This is most likely a problem with the bcrypt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls bcrypt npm ERR! There is likely additional logging output above. npm ERR! System Linux 3.5.0-21-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt" npm ERR! cwd /home/ubuntu/public/song-swap npm ERR! node -v v0.11.2-pre npm ERR! npm -v 1.2.18 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/ubuntu/public/song-swap/npm-debug.log npm ERR! not ok code 0 ``` -------------------------------- ### Install gyp-next using uv Source: https://github.com/nodejs/node-gyp/blob/main/gyp/README.md Install the gyp-next package using uv. This is an alternative package manager for Python. ```bash uv tool install gyp-next ``` -------------------------------- ### Install global node-gyp on Linux/macOS Source: https://github.com/nodejs/node-gyp/blob/main/docs/Force-npm-to-use-global-node-gyp.md Installs the latest version of node-gyp globally. Sudo may be required. ```bash npm install --global node-gyp@latest ``` -------------------------------- ### Install Development Dependencies and Run Tests Source: https://github.com/nodejs/node-gyp/blob/main/gyp/docs/Hacking.md Install the necessary development dependencies using pip and then run the test suite with pytest. Ensure your pip is up-to-date. ```sh python -m pip install --upgrade pip pip install --editable ".[dev]" python -m pytest ``` -------------------------------- ### Install node-gyp globally Source: https://github.com/nodejs/node-gyp/blob/main/README.md Installs the node-gyp package globally using npm. Ensure you have Node.js and npm installed. ```bash npm install -g node-gyp ``` -------------------------------- ### Install gyp-next using pip Source: https://github.com/nodejs/node-gyp/blob/main/gyp/README.md Install the gyp-next package using pip for Python 3. This command installs the package globally. ```bash python3 -m pip install gyp-next ``` -------------------------------- ### Example List of Strings Source: https://github.com/nodejs/node-gyp/blob/main/gyp/docs/InputFormatReference.md Demonstrates a list containing three string values. Trailing commas are permitted. ```gyp [ 'Generate', 'Your', 'Projects', ] ``` -------------------------------- ### Command Expansion Example Source: https://github.com/nodejs/node-gyp/blob/main/gyp/docs/InputFormatReference.md Illustrates command expansions using ') variable expansions, including string and list contexts. ```python 'variables' : [ 'foo': '