Product: PDF Tron for Node
Product Version: 9.2.0-1
Please give a brief summary of your issue:
@pdftron/pdfnet-node NPM package fails to install on Docker (node:lts image) run on a M1 MacBook Pro
Please describe your issue and provide steps to reproduce it:
(You should be running Docker through a MacBook Pro M1)
Create a Docker container with node:lts image like that:
FROM node:lts
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json ./
RUN npm install
# Bundle app source
COPY . .
EXPOSE 3000
When you want to run your docker containers, it will throw this error:
#8 25.03 npm ERR! code 1
#8 25.03 npm ERR! path /usr/src/app/node_modules/@pdftron/pdfnet-node
#8 25.04 npm ERR! command failed
#8 25.05 npm ERR! command sh -c node-pre-gyp install --fallback-to-build=false
#8 25.05 npm ERR! response status 403 Forbidden on https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.2.0-node-v102-linux-arm64.tar.gz
#8 25.05 npm ERR! node-pre-gyp info it worked if it ends with ok
#8 25.05 npm ERR! node-pre-gyp info using node-pre-gyp@1.0.5
#8 25.05 npm ERR! node-pre-gyp info using node@17.7.1 | linux | arm64
#8 25.05 npm ERR! node-pre-gyp info check checked for "/usr/src/app/node_modules/@pdftron/pdfnet-node/pdfnet-addon.node" (not found)
#8 25.05 npm ERR! node-pre-gyp http GET https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.2.0-node-v102-linux-arm64.tar.gz
#8 25.05 npm ERR! node-pre-gyp ERR! install response status 403 Forbidden on https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.2.0-node-v102-linux-arm64.tar.gz
#8 25.05 npm ERR! node-pre-gyp ERR! install error
#8 25.05 npm ERR! node-pre-gyp ERR! stack Error: response status 403 Forbidden on https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.2.0-node-v102-linux-arm64.tar.gz
#8 25.05 npm ERR! node-pre-gyp ERR! stack at /usr/src/app/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
#8 25.05 npm ERR! node-pre-gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:96:5)
#8 25.05 npm ERR! node-pre-gyp ERR! System Linux 5.10.104-linuxkit
#8 25.05 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/src/app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
#8 25.05 npm ERR! node-pre-gyp ERR! cwd /usr/src/app/node_modules/@pdftron/pdfnet-node
#8 25.05 npm ERR! node-pre-gyp ERR! node -v v17.7.1
#8 25.05 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.5
#8 25.05 npm ERR! node-pre-gyp ERR! not ok
So it seems it tries to grab https://www.pdftron.com/downloads/PDFNetNode/pdfnet-addon-v9.2.0-node-v102-linux-arm64.tar.gz
which doesn’t exists.
We already had this error months ago, but we were expecting that it has been resolved as the support told us, at the moment we bought a licence.
IMPORTANT NOTES:
- downgrading Docker Node image version does nothing
- it runs without any issues on our Dockerized Gitlab Pipelines (Linux)
- it works well on the MacBook Pro out of the Docker container (e.g. if we’re running the project directly with node)