summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/nodejs
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-11-07 19:38:28 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-02-19 16:47:27 +0000
commit0c98353091e6c95f6a70a461d0146b7872a8f14d (patch)
treea82048200876465f53e71a3156c58879207fa429 /auto/modules/nodejs
parentea239635beac396fb859d822474af76a7014c70d (diff)
downloadunit-0c98353091e6c95f6a70a461d0146b7872a8f14d.tar.gz
unit-0c98353091e6c95f6a70a461d0146b7872a8f14d.tar.bz2
Node.js: Build/install fix
A user on GitHub reported an issue when trying to build/install the nodejs language module. Doing a $ ./configure nodejs --node=/usr/bin/node --npm=/usr/bin/npm --node-gyp=/usr/bin/node-gyp $ make install was throwing the following error mv build/src//usr/bin/node/unit-http-g/unit-http-1.31.1.tgz build//usr/bin/node-unit-http-g.tar.gz mv: cannot move 'build/src//usr/bin/node/unit-http-g/unit-http-1.31.1.tgz' to 'build//usr/bin/node-unit-http-g.tar.gz': No such file or directory make: *** [build/Makefile:2061: build//usr/bin/node-unit-http-g.tar.gz] Error 1 The fact that we're using the path given by --node= to then use as directory locations seems erroneous. But rather than risk breaking existing expectations the simple fix is to just use build/src in the destination path above to match that of the source. These paths were added in some previous commits, and the missing 'src/' component looks like an oversight. After this commit both the following work $ ./configure nodejs --node-gyp=/usr/lib/node_modules/bin/node-gyp-bin/node-gyp --local=/opt/unit/node $ ./configure nodejs --node=/usr/bin/node --node-gyp=/usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp --local=/opt/unit/node Reported-by: ruspaul013 <https://github.com/ruspaul013> Tested-by: ruspaul013 <https://github.com/ruspaul013> Fixes: 0ee8de554 ("Fixed Makefile target for NodeJS.") Fixes: c84948386 ("Node.js: fixing module global installation.") Reviewed-by: Timo Stark <t.stark@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r--auto/modules/nodejs4
1 files changed, 2 insertions, 2 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs
index 968f3fdf..472fb3be 100644
--- a/auto/modules/nodejs
+++ b/auto/modules/nodejs
@@ -123,8 +123,8 @@ fi
NXT_NODE_TMP=${NXT_BUILD_DIR}/src/${NXT_NODE}/unit-http
NXT_NODE_TMP_G=${NXT_BUILD_DIR}/src/${NXT_NODE}/unit-http-g
-NXT_NODE_TARBALL=${NXT_BUILD_DIR}/${NXT_NODE}-unit-http.tar.gz
-NXT_NODE_TARBALL_G=${NXT_BUILD_DIR}/${NXT_NODE}-unit-http-g.tar.gz
+NXT_NODE_TARBALL=${NXT_BUILD_DIR}/src/${NXT_NODE}-unit-http.tar.gz
+NXT_NODE_TARBALL_G=${NXT_BUILD_DIR}/src/${NXT_NODE}-unit-http-g.tar.gz
NXT_NODE_VERSION_FILE=${NXT_BUILD_DIR}/src/${NXT_NODE}/version.h
NXT_NODE_PACKAGE_FILE=${NXT_BUILD_DIR}/src/${NXT_NODE}/package.json
NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src \